Hi, Jenny. This is pretty tough to answer without seeing it but it is usually impractical to sand only the areas with the black stain. You usually end up having to refinish the whole floor. The next issue is how deep the stain goes. This is difficult to tell from the top and you have to sand until you run out of the black or try to bleach it out. In severe cases, the black goes completely through the wood and you are better off replacing the boards with others taken from a closet or someplace similar. Many times you have a problem with this as older houses do not have the closets that we do today and you have to replace with new wood.
As you can tell, it is difficult to be definative. Your best approach might be to call a couple of local professional floor refinishers.