The easy one first. if you keep them locked in the coop for a while, they will come to think of it as home and return there every night to roost. I've got separate groups right now, split due to age differences. The adults go to their coop at least a half hour before sunset. The 9 week olds wait until the last second, just before dark to go in. But they all go in.
When you first let them out, say for a week or so, they will probably stay pretty close to the coop. But as they get comfortable being out and about, they tend to roam further. Mine usually stay within 400 feet of the coop, but part of that may be because of the layout of the land here. You might get some that will roam further. If you have fences, even if they can easily fly over the fence, they may tend to stay in the yard. Or you may have some that like to roam. A lot depends on your set-up and situation and the personality of your chickens.
I used to have three that liked to play in the road, a private gravel road with very little traffic. I ate the ringleader of that cabal. The others then stayed out of the road. They no longer had the ringleader to take them there.
It's not an easy one to answer because I don't think there is one asnswer for it.