Hardwood that looks past saving usually is not. Under the scratches and worn finish there is normally sound wood, and sanding it back exposes fresh material to stain and seal.
The floor is sanded in stages to progressively finer grit, cleaned thoroughly, stained to the color you choose, and sealed. Dust control matters here and so does timing — a floor needs to cure before furniture comes back.
We will tell you at the estimate if a floor has been sanded too many times already, rather than take the job and find out halfway through.