how to cure scratches and dents on hardwood floor
Michael Karas's answer is the standard way to refinish the floor to an "original" appearance if there is enough wood left.  If sanding out deep scratches, dents, and chips isn't an option, or you will be satisfied with "less than perfect", a light sanding just to evenly remove the old finish and then refinishing may be adequate.  Short of that, there are still some options, especially for dents and chips that light sanding won't help.


Minor scratches and scuffs can often be masked by just cleaning and putting down some clear water-based polyurethane finish.  You can use a small brush or cotton swab to saturate the scratch, then feather the area.

Sometimes, rather than staining the floor and then putting down a clear shine coat, installers or refinishers take shortcuts and just use a colored finish.  If scratches leave bare, unstained wood showing, you may need to stain the scratch to match before putting down clear poly. 

Note that touching up in this way can be a fast, big improvement, but it won't match the results of sanding and doing it right.  The scratches are likely to still be visible from an angle if the lighting is good.
Dents sometimes respond to steam, re-expanding the wood.  
Chips can be a combination of a dent and missing wood, so steam may lessen it.  Then the appearance can be improved through filling and matching, depending on the wood and the nature of the chip.  The result will be much less noticeable, but will usually look like a color-matched knot or paint spot.  An artist can sometimes match the wood pattern, making it hardly noticeable, but those efforts tend not to stand up to wear, especially if you allow the poly coat to wear off.