We let our chickens free-range during the day, but at night we keep them locked in their pen to protect them from predators. We learned about this the hard way when a fox got two of our hens early one morning.
Here is a view from the back. The top door is where we can access the nesting boxes to gather eggs. The panel under that can be removed to clean out the pen. After all, chickens do poop on everything! You can see the small door on the bottom right side that we remove every morning to allow the chickens to roam. Their food hangs under the nesting/roosting area to stay dry in case it rains. They really don't eat much of their food in the summer because they have so many bugs to eat in our yard.
You can see the recycled wheels (from an old garden cart) that enable us to move the pen around our yard. This ensures we don't have any bald spots in the yard.
Here is a close-up of their ramp up into their nesting/roosting area. It is a shelf that came out of our old fridge.
This is a view inside the nesting/roosting area. Notice the privacy curtain to the left. Our chickens are a little modest and like their privacy. Straight ahead is the recycled window. The bars that criss-cross the area are the roosting bars. One chicken likes the upper bar and one likes the lower bar.