The hens get locked in the coop every night. We free range them on the property, and they return each night on their own before dusk. The windows and the vent holes have hardware cloth over them (heavy wire mesh 1/4" x 1/4") to deter predators, and the chicken door at the coop and the run get closed. The one to the coop is an automatic door that opens at sunrise and closes at sunset. The door to the run is on a long rope up to our deck, and I open that each morning and close it each evening.
The first year we had them, we always kept them in the house and the run. Starting the 2nd year, we decided to free range them on the property so they would have more room and get better nourishment (seeds, bugs, worms, etc.). We had little predator problems until last year. We lost 1 or 2 here and there...either to a fox or a hawk...all we would find is a bunch of feathers scattered in one spot. Then, last summer, we had a Saturday massacre. We came home from the grocery store to find 3 hens gone and the rooster dead down in the field. He must have put up some fight because there was a trail of feathers up one side of the field and down the other. We found him dead with his neck ripped open. He must have bled out. Whenever one gets taken by a predator, they get nervous and hang out in the coop and run...and, we keep them locked in for at least a week to make sure the predator knows the free lunch is over. It's always upsetting, but it is part and parcel for free ranging chickens. They have a happier life and get much better nutrition than any chicken food you could provide.
We started with 16 3 years ago; we gave two roosters away and two new ones were born. One chicken had to be put to death and another one just dropped dead one day...not a scratch on her. We now have 3 - 3 year old hens. We are planning to get 7 - 17 week old hens next week. Right now I am splitting the run in two and will build a small temporary coop in the 2nd half for the new hens where they will live for a week to 10 days while our old hens and the new ones get used to each other. Slowly, we will introduce them to each other, and that will cut down on any severe squabbling...you know "hen pecking" and the "pecking order". It is serious chicken business.
This is a pic of a bunch of them from early last spring sitting on the beams that we were to use for the foundation of our greenhouse. (We had dug it out before winter, but they scratch a bunch of dirt back in!) Notice the rooster is standing and observing. Roosters take good care of the hens...watching for problems, making warning calls when a problem is spotted, directing them to food, and letting them eat before he does. It is absolutely amazing to raise. The ones pictured here are: Delawares (white), Barred Rock (gray and black lines), New Hampshire Reds (tan), Jersey Giants (black), and Golden Wyandottes (black and tan). All lay brown eggs. (BTW...there are no difference between white and brown eggs. Many people think brown eggs are better for you, but it is not true. And, fresh farm eggs have much more nutrition and less cholesterol than store bought ones.)