Call them when you give treats (in the run), and pretty soon they will come running to you when you call. (The "call" can be a word, or whistling, or shaking the container of treats, or any other sound you like. If you always bring the treats in the same container, the sight of the container might be all the "call" you need.)
For chickens who come when called, it's pretty easy to put them back. Call them into the run, then close the door while they are eating. This works better with treats like scratch grains or wet mash that they stay put to eat, but does not work nearly as well with things like a bread crust that they can pick up and carry back out (I learned that the hard way!)
In general, chickens tend to stay close to their run the first few times you let them out, and wander farther away as they get more used to the area. They also tend to wander farther when they have more time. So if you only let them out for a short time, they are more likely to still be close when you want to put them back. Of course there are exceptions-- if they learn of a great place to forage, they may run there right away (example: a strawberry patch when the berries are ripe.)