Hardwood floors can turn black from mold growth or the tannins in the wood reacting to minerals in the water. In either situation you’ll have to strip the finish of the wood, bleach it, and then reseal it. In the worst case scenario you’d have to replace your old wooden floorboards with new ones.