Some places use an honesty system where you drop money into a box and get a thing to put on your dash. Other places have a gate house or booth where you can pay.
You aren't forbidden from walking in. It's usually just not a practical choice. Usually trails are in very remote places so you'd probably walk further than the length of the trail to get to it lol. Other places which are in more urban environments (like a trail through a city or places like Stone Mountain Georgia) might have easy places to park and walk in but it's technically private property. And again, still usually just extra walking. For things like bike trails this is more viable probably.
In America we don't have any sort of "right to roam" law, sadly. If you want to feel even more smug and mock my country, wait until you watch this: https://youtu.be/yBrtWXBhuuo
In the west there is a grid pattern of land like a checker board. Like this:
The Xs are private property and you cannot access them. The Os are public property. The ?s in the middle are public property, but how do you get to them? The only way is by crossing through a corner. Obviously, the private land owners would prefer to view the public land as an extension of their private land so they believe that corner crossing should be illegal because it passes through their property. (Even if you don't step on it you have to cross through their airspace so to speak.) Meanwhile, everyone else says, "hey, you can't just double your land like this! Let me have access to the public land! What the hell do you mean airspace? I'm not a plane! I'm a person! And I didn't step on your property!"