Before starting this repair, you need to realize you can't make floors look any worse than they are. Just about anything you do will be an improvement.
1. Starting from scratch
The first thing to do is to sand the damaged areas. If there are deep scratches, you'll have to use coarser sandpaper to start the process. Use this coarse sandpaper only in the area of the deep scratches. You will be using several grits of paper, from coarse to very fine, to complete the sanding.
You can sand by hand if you have smaller areas less than 6 inches square. Be sure to use a sanding block. If you have access to an electric palm sander, this tool will make the job go faster.
Sand the damaged area, and as you use the fine-grit sandpapers, extend the sanding to the edges of the floor that are not damaged. Just go over onto these edges about an inch. Use finer grits of sandpaper advancing finally to 240 grit. Aluminum oxide sandpaper (usually a medium brown color) is a great paper to use for this project. The wood needs to be as smooth as glass before you continue.
2. Biting the dust
Remove all dust with a vacuum that exhausts outdoors, if possible. Wipe the sanded area with a tack cloth. If the floor is natural with no stain, the next step is to apply the first coat of finish.
3. Oil and water
Floor urethane comes in both oil- and water-based formulations. The water-based urethanes typically will be clear when they dry and will not impart any color to the wood. The oil-based urethanes tend to have a slight amber or golden appearance once they dry.
To see which one best matches your existing floor color, you can sand a tiny area of flooring, about the size of a postage stamp, in a closet or under some large piece of furniture. Using a cotton swab, apply a drop or two of each of the urethanes to half of the sanded area. Allow to dry to see which one achieves the best color match.
4. In living color
If you have to match a stained floor, the sanded wood must be satin smooth so the stain doesn't come out too dark. You may have to purchase several small cans of test stain to get an exact match. When you apply the stain and it's wet (just after you lightly wipe off the excess stain from the wood), the color you see at that instant is the color the stain will be after urethane is applied to it.
5. Glossing over
Urethanes come in varying shades of gloss. To match your existing floor gloss, you'll have to clean it well to see what it is. If you make a mistake and select the wrong gloss, you can easily recoat the repaired area until you get a close or perfect match.
You will need to apply at least three coats of urethane to complete the repair. Read the label to determine how long you need to wait before you apply another coat. You have to sand the urethane lightly before you apply the next coat. Use the tack cloth to get up all dust before you apply each coat.
6. Living on the edge
Apply the final coat of urethane so it stops at the edges of the wood strips and not in the middle of a single piece of wood. This natural break between the strips of wood flooring helps to disguise minor differences in the sheen of the urethane. If the sheen is not perfectly matched, wait about two weeks and try to burnish it with an old towel to make it blend better with the slightly worn finish of the hardwood flooring immediately adjacent to the repaired area.