The best time to do any major sanding is BEFORE the main pieces are attached. Sandpaper is graded as medium, or numbers 60, 80, and 100. Fine sandpaper numbers are 150,180, and very fine 220, 240, and 280. Medium is usually used for the first sanding, fine for smoother results and very fine for smoothing finishes between coats. Sandpaper can be used wet for some finishes.
You can fill in nail holes with a wood puffy before sanding if you are not planning to stain the wood. If you are staining, fill the holes after the stain is applied. In either case match the wood puffy closely in color to the stock or use saw dust and wood glue to make your own putty.
Sand with a fine, wet sandpaper (start with a 120 grit on plywood and 60-80 grit on other lumber) wrapped around a felt pad or use a pad or orbital sander. Use aluminum oxide sandpaper because its grit material lasts longer.
Sand slowly so you don't go through the veneer and vacuum frequently to remove dust. Finish manufacturers recommend which grit of sandpaper to use with their specific finishes to achieve the smoothest result. Feel the wood to check on the smoothness as you work, touch is the only way to get a smooth surface. Make sure that you remove all dust, finger marks and excess glue before applying the finish.
First vacuum or brush the bookcase clean, then wipe with a tack cloth. When it is time to varnish, vacuum the room and let the remaining dust settle for at least 24 hours. Wear lint free clothes and use the fastest drying varnish available. Use a tack rag to remove dust before applying varnish and between coats. Do not apply urethane varnish over a coat of shellac or lacquer.
Applying Filler (Optional)
The key to a beautiful finish is making sure the surface is as smooth as possible.
Countersink all nails and repair all dents.
Apply a coat of filler to all surfaces of the bookcase. (Paste wood filler, thinned with turpentine or paint thinner is best.) Filler is a compound mixed to the consistency of yogurt, which fills all the pores of the wood for a smoother finish. Do not use the wood filler that is sold to repair rotted wood. Work the filler into the wood instead of just brushing it on. A short-bristled brush is best, and can be made from an old paint brush. Using the filler gives your bookcase that "Extra" touch of beauty by providing a smoother finish. You can color the filler if you like after thinning for a perfect match of wood and filler.
Brush the filler on with the grain of the wood, making sure the pores are filled.
Wipe off the first coat of filler. Recoat, this time working across the grain. Make sure the brush is heavily loaded with filler.