Pry up the damaged boards. Work carefully so that you do not damage any good boards. Place the prybar at the seam of one of the damaged boards. Insert it down between the boards and pry upward. This will pop the nails out. Repeat until all the damaged boards have been removed.
Cut the new boards to fit. Use a circular saw to cut your new boards to fit the space. Use a measuring tape to measure the space left, and then make your cuts.
Nail the new boards in place. Use a hammer and nails or a nail gun, and attach the new boards. Make sure that they are nailed into the floor joists.
Sand down the new wood. Feather your sanding onto the surrounding old boards to help hide the patch. Use a medium-grade sandpaper for this work. Clean up all the dust with a shop vacuum and a tack cloth.
Apply a wood stain. Use a paintbrush, and go in the direction of the wood grain. Allow each coat enough time to dry as per manufacturer instructions. Sand between coats. Once the new boards match the color of the old as closely as possible, let the last coat dry at least eight hours.
Clear coat the wood. Use a polyurethane clear coat to protect the new wood from future damage. Apply at least two coats, sanding gently in between and removing all dust before applying the next coat.