Nest boxes are limited to your imagination only. You can use almost any safe nontoxic container or build your own nest box. Some folks use milk crates, rubber storage boxes, 5-gallon buckets laying on their sides.
Be sure that the next box you chose is able to be cleaned and if possible portable too. Depending on the type of coop, the season, and the sunlight, some nest boxes should be placed in a dim area out of the heat and rain. Each season I move the plastic nest boxes that we use to a different area of the coops for better sunlight and safety from wind, rain and heat.
A safe nest box should be placed either on the ground (if you don't mind bending over) or no more than three feet high. Put a perch bar in front or well behind the next boxes to prevent any dropping directly on the eggs. Chickens will sit on the roosts/ perches. If the next box is below, this can make for messy eggs.
What is the best bedding for your nest box, again it's up to how you wish to clean and how often?
A good rule: I change nesting material (We use hay) every month or when it becomes soiled or damp. Chickens will lay more often and happier if their nest boxes are clean and safe. When adding new hay, it's placed in the box in a messy pile.
Most laying hens like the "nesting" that comes with each new batch of hay and chirp and cluck endlessly making a nice new nest for themselves.
While you can use pine shavings just as well unless your nest box has a firm flat bottom the eggs will roll into the shavings and make eggs harder to find when you are collecting them.
No matter what you do to protect your hens and eggs there is always some varmint that will try to get into your nest box to eat the eggs or chicks. Snakes can be a real pest. If you have an outdoor opening to your coop with the lift-type lid, be sure to put a latch on the cover at night to prevent any animals from getting into your coop, or just as bad is a snake in your nest box eating eggs or chicks.
Keep a handy hoe or sharp shovel nearby just in case you find a snake in the egg box. If you find a snake don't panic. (OK panic, I do every time!) but get your how or rake/shovel and slowly put it under the snake. You can lift it out in most cases and remove it to an area away from the chicken coop. If you release it (it's up to you) it may be back.
If you see a venomous snake do NOT attempt to touch it unless you are experienced with wildlife. Many snakes that are out to eat a meal of eggs or chicks are NOT poisonous. If your coop is secure you will never have to see a snake in your coop. Other predators to watch for are rats and mice. they will stay near the coop as they eat feed and sometimes chicks and eggs too!
Be sure to check your net box every day to keep the bedding dry and sanitary.
Sometimes chickens like to sleep in the next boxes at night and will make a mess. You can cover the nest box at night so the hens won't soil the box every day..