There are many factors to consider when removing carpet, and more still when installing hardwood floors in place of the carpet. You need to know how the carpet was installed and what method the installers used to secure it, and to secure the carpet padding. It's important to find out what type of flooring lies beneath the carpet as well, as the products you'd use to remove glue residue from a natural stone floor differ from those you'd use on wood flooring.
Prepare the room by moving everything out. Use a pry bar to remove any baseboards. Be gentle if you wish to reuse them. Mark the positions of the floor joists on the wall so that you'll be able to find them when you work on the subfloor and install in the hardwood.
Lift the carpet way from the tack strip at one of the corners. Tug and shift the carpet to release it and use a carpet knife to cut it into more easily managed sections as you work. Roll the sections up and secure them with twine or masking tape.
Remove the carpet padding either by using needle-nosed pliers to remove the staples or by softening the adhesive. Different adhesives require different softeners. Start by using mineral spirits and if these do not loosen the glue, you'll need a commercial adhesive remover. Either way, use a putty knife to scrape up the softened residue.
Pry up the tack strips using a hammer to get a pry bar under them. Pull up one section and then move on to the next until the entire strip is free.
Clean the floor thoroughly, scraping up any remaining glue residue or using an adhesive remover as per the manufacturer's instructions. Sweep or vacuum up any dust or dirt and mop the floor thoroughly to prepare it for the hardwood installation.
Make any necessary repairs to the subfloor. If your wooden subfloor is loose, screw it tightly down to the floor joists. Smooth out any dips, valleys or unlevel areas using a floor leveling compound, asphalt shingles or asphalt felt.
Lay down a layer of 15-pound asphalt felt. This protects your floor from moisture, reduces squeaks and provides padding.
Begin laying your hardwood floor along the longest wall, perpendicular to the floor joists. Place a 1/2-inch spacer between the wall and each board to allow for movement. Position a few rows of floor boards, staggering the joints by about six inches to make sure they do not line up.
Lay the first row and drill pilot holes into the boards and subfloor. Drive 1½-inch finishing nails through the pilot holes into the subfloor and the joists below. Keep the nails close to the wall, where they will be hidden by the baseboards.
Knock each board tight against the previous boards--both the previous row and the previous pieces--using a scrap piece of flooring placed along it and tapped with a rubber mallet. Fit the tongue of each of the first three rows into the groove of the last. Use a wood floor nailer to secure each row, nailing it at each joist and midway between each joist.
Face-nail the final board as you did the first.