After you have prepared and repaired the floor, you will need to take a few additional steps before sanding. Remove all furniture and preferably the drapes. If you do not want to actually remove the drapes, you can fold them, hang them with a coat hanger from the drapery rod, and then slip a large plastic bag over them and tightly seal the bag.
Clear the Area
Remove floor registers and seal them with plastic, as well as any heating or air conditioning ducts. Search out any protruding nail heads and countersink them with a nailset. Sanding produces very flammable dust, so turn off all pilot lights and electrical appliances. I also recommend that you seal off all electrical outlets. Seal the room tightly from the rest of the house to avoid dust problems. Open a window and use a window fan to provide adequate ventilation while sanding, though.
Before beginning to sand, remove all the shoe molding (the baseboards are usually left in place). To remove the shoe molding, use a utility knife to carefully cut through any thick paint layers between the baseboards and the molding. Carefully pry the molding loose with a pry bar and a wooden wedge so as not to mar the baseboards. Number each piece so you will know where it goes when you are ready to replace it.
Use a putty knife and wood dough to fill all the small holes and cracks. Be sure the wood dough matches the color of the unfinished flooring. Allow the wood dough to properly dry before sanding. After all this is done, sweep the floor well and vacuum with a good heavy-duty shop vac.