Sand off the finish off the main part of the floor with a drum sander, using a coarse, 50-grit belt, then sand the edges with a flooring disk sander, or edger, using a 50-grit sanding disk. Scrape the finish off the corners of the floor where the edger won't reach with a floor scraper. Vacuum up the sanding dust when you're finished.
Mix a solution of oxalic acid-based wood bleach and hot water in a bucket according to the specifications on the container. You can also use 12 to 16 oz. of pure oxalic crystals dissolved in 1 gallon of hot water. If you only have to remove a few stains, use a rag to spread the solution in a wide area around each stain, not just on the stain itself. If the staining is extensive, spread the solution over the whole floor. Let it sit overnight, then apply it again if the stains are still noticeable.
Bleach out problem stains by moistening a rag with the bleaching solution and placing the rag over the stain. Leave it there overnight.
Neutralize the oxalic acid after the stains are gone by washing it off with clean water. Let the floor dry completely before proceeding.
Sand the floor again with the drum sander and edger, this time using 80-grit sandpaper. Vacuum the floor, then make a third pass with both machines, using 100-grit paper.
Vacuum the floor, then wipe it down with a damp cloth to get all the sanding dust out of the cracks. If the staining of the wood is still noticeable, blend it by staining the floor a dark color. Spread the stain with a rag, then wipe off the excess with another rag after it has penetrated the grain, which usually takes 10 to 20 minutes. Let the stain dry overnight.
Finish the floor with a clear finish. Spread two or three coats with a finish applicator, letting each coat dry before applying the next one. Sand the floor lightly by hand between coats, or use a floor buffer fitted with a sanding screen.