Medium density fiberboard, or MDF, is a wood product commonly used for furniture construction. MDF is made out of wood fibres bonded together with wax or resin and pressed into a very dense, hard construction material, similar to plywood. MDF is suitable for use in building bookcases, with the only proviso being that wide bookcases -- those wider than around 40 inches -- will need a central support for the shelves so that they won't droop in the middle over time.
Cut the MDF into two lengths of 12-by-80 inches for the side panels of the bookcase and nine lengths of 12-by-30 inches for the top and bottom of the bookcase as well as the shelves.
Lay the two side panels flat on your work surface, side by side. Measure and mark a line every five inches along the width of the panels, ensuring that the lines are even on both pieces. Measure in an inch from each side of the panels and mark a line along the entire length at this point, creating cross points with the lines running across the width.
Drill a 1/4-inch deep hole, sized to fit the shelf pegs, at each cross point to create the peg holes for adjustable shelving on the bookcase.
Form the side panels and two of the 12-by-30 inch pieces of MDF into a rectangle. The sides with the peg holes should be facing inward on the side panels and the ends of the top and bottom pieces of MDF should abut the inside edge of the side panels, forming the corners.
Glue the joint at the corners and set to dry in corner clamps. Hammer a 2-inch nail every inch through the sides of the side panels into the abutting ends of the top and bottom panels of the bookcase. Remove the clamps and stand the bookcase upright.
Paint the bookcase and the shelves and let dry. Once they are dry, position the bookcase in place, insert shelf pegs into the shelf peg holes and place the shelves on top at the desired heights.
Use finishing nails to tack on a 32-by-80 inch piece of 1/4-inch MDF to the back of the bookcase if you want a covered back. Apply moulding around the top and base of the bookcase for a decorative finish.