Locate and seal the leak causing the water marks. You cannot proceed to treat the stains until you locate and correct the problem.
Spread a drop cloth on the floor below the area you'll be painting in the basement.
Mix a can of stain blocker with a stirrer or prepare a stain blocker of 2 parts oil paint to 1 part primer, and mix thoroughly.
Pour the paint preparation into the paint tray.
Apply the blocker to the stained surface in long, even strokes using a roller brush. Let the blocker dry at least 24 hours before evaluating whether a second coat is necessary. If the stain does not show through the blocker once it has dried, paint over the stain blocker in a color of your choice without worrying about the return of water marks. If the stains bleed through the blocker, apply a second coat.