It was highly popular at one point to carpet rooms with wall-to-wall carpeting, even to the point of covering up a hardwood floor. If you have an older home, you may take out the carpet to find hardwood underneath. The condition of the hardwood might not be so good after many years of being carpeted, which may lead you to want to refinish it.
Remove everything from the room you're working in. Rugs, furniture, wall hangings and curtains all need to go, along with the contents of any closets. This is a dusty and messy project. If you didn't take up any shoe molding during the carpet removal process, you must remove it now. Baseboard removal is optional, and molding can be taken up with a crowbar and a putty knife or painter's tool.
Cover up any air vents, lighting fixtures and doorframes with sheets of plastic or trash bags and painter's tape or masking tape. Cover up electrical outlets and light switches.
Clean the floor. Sometimes floors get very dirty after being under carpeting for a long time. You may need to simply sweep, or you might need to clean with a damp mop or vacuum, or a combination of the three depending upon the condition of your floor.
Make any repairs, if needed. If there are loose boards, add new finishing nails close to the nails already in the board; make sure the head of the nail goes below the surface of the board by using a nail set on the top of the nail. Do the same with any nails that are protruding from the floor; sanding over the heads of nails is not good for the sander.
Sand the floor with a drum sander, a commonly rented piece of equipment. Wear goggles, a mask and earplugs whenever operating the sander. These sanders are very efficient and can remove a lot of material, so pull it along the floor slowly, not forcing it and not letting it rest in any one spot. Work in rows with the grain of the wood. Start with a low sanding grit, about 36 grit. The sandpaper is wound around a drum accessed through the back of the machine; tuck one end of the sandpaper into the slot in the drum, wind it around the drum by turning it by hand, then tuck in the other end of the sandpaper into the drum. Tighten the paper by turning the nuts on either end of the drum with a wrench. The machine must be off and unplugged when you're doing this; you can seriously injure yourself if the machine is on or turns on during this process. Use extreme caution when operating this machinery, and read and observe all safety warnings on the sander.
Sand the sides of the room and the corners with a smaller edger sander. Wear the same protective gear you used with the drum sander. The floor sander will not be able to reach these spots. Sand these areas so that they are flush with and look like the rest of the floor. Like the floor sander, don't let the edger sander rest in any one spot and keep it moving. Use the same grit sandpaper you used for the drum sander. Edger sanders use a disk of sandpaper rather than a sheet, which attaches with a screw and washer, which is removed and replaced using a wrench. Again, be sure that the sander is off and unplugged when doing this; use extreme precaution and read and follow all safety warnings.
Clean the floor again.
Sand the floor again with the drum sander, moving on to a medium grit, around 50 to 60 grit. Afterward, sand the sides and corners with the edger sander and a matching grit.
Clean the floor again.
Fill any holes that you see with a wood filler. Fill up the holes, then scrape over the top to smooth them with a putty knife. You can use this for gouges or scratches, too. Let the repair dry. If you want the floor to seem a little more aged or rustic, you can skip this step.
Sand with the drum sander and a high grit sandpaper, 80 to 100 grit. Again, use the edger sander with a matching sandpaper afterward. The floor should be smooth and have no finish left when you're done.
Scrape the finish off of the corners with a scraper or sandpaper. The edger sander won't be able to get all the way into the corners of the room, so it has to be done by hand.
Clean one more time with a vacuum and wipe down the floor with a tack cloth. Take down the plastic.
Apply a stain, if desired. Apply stain with a brush, then wipe with a dry cotton rag. Only apply the stain to a few floorboards at a time to keep the edge wet, and be sure that you can exit the room without stepping on the stain. Leaving the stain on longer will make the wood darker. Keep in mind that if you left scratches or holes, stain will emphasize them. Let the stain dry. You can use more than one coat.
Apply a finish over the wood. While you have many options, a water-based polyurethane is a quick, easy and efficient finish for this project that will make your floors shine. A gloss polyurethane will give you the most shine on your floor. Apply using a brush, going around the perimeter of the floor and then applying it to center. Again, be sure that you can exit the room when you've finished. Go with the grain of the wood. If you want more than one coat, sand gently between coats once the polyurethane has dried and wipe up the dust. Three coats is good for most situations.