Try a Mild Cleanser
Before you turn to strongly acidic cleaners, it's a good idea to try mild ones to see if they work. Lemon juice is mildly acidic and may remove light rust stains, especially if you combine it with baking soda. Mix 2 parts lemon juice with 1 part baking soda to make a paste, and rub the paste on the rusty stain with a nonabrasive sponge. It may take several tries, but this treatment can be effective. If it is, rinse the area with clear water when you're done.
Call in the Cavalry
Chances are, a weak cleaner won't have much effect on an old or dark rust stain, and you'll need something that is more acidic. Some acids are too strong to use and will damage the flooring while they remove the rust, but oxalic acid, the main ingredient in wood bleach, is just strong enough to do the job without causing damage. You can buy oxalic acid crystals at hardware stores, but a safer alternative that's easier to use is wood bleach. Be sure the bleach contains oxalic acid and not hydrogen peroxide, which is another type of wood bleach.
Using Oxalic Acid
You need to wear rubber gloves and goggles when you clean with oxalic acid. If you buy crystals, mix them with water to form a saturated solution -- one in which no more crystals will dissolve; if you buy wood bleach, use it full-strength from the bottle. Moisten a cloth with the bleach; lay it on the rusty area and leave it for 10 minutes to dissolve the discoloration. After wiping the stain away, neutralize the floor with a mixture of 2 tablespoons baking soda per quart of water, and then rinse with clear water.
Alternative Stain Removers
If you can't get a rust stain out with oxalic acid, it may not be rust; some dye and tannin stains look like rust. Mixing laundry detergent with water makes an all-purpose cleaner that you may find effective -- rub it into the stain with a soft, nonabrasive cloth. A solution of 1 part bleach to 2 parts water is also effective against dye stains; like oxalic acid, it works best if you wet a cloth and leave the cloth on the stain for five or 10 minutes before rubbing. Finally, rub out brown surface stains caused by paint or nail polish with rubbing alcohol.