An indication of water damage to walls or ceilings due to a leaking pipe or foundation leak is bubbling paint or yellowish/brownish coloring. If you notice areas like this poke or drill a hole in the damaged drywall areas to see if any water drains. If so, there is most likely insulation behind that drywall which is saturated with water that will need to be replaced. The water damaged drywall area will need to be cut out, insulation removed and new of both installed. If the wet insulation is not removed it will continue to seep water into the drywall causing the problem to continue and develop mold.
If you notice small black dots on the surface of the drywall that is an indication of mold and all of the drywall and insulation will need to be removed regardless of water damaged to completely rid the space of the mold. If any of the wood structure behind the drywall has mold (black spots) make sure to clean with bleach to remove before installing the new drywall and insulation.
If the area does not have insulation and is just showing some bubbling and light discoloration, that area can be scraped to remove the failed paint, prepped, primed/sealed and painted. Primer and sealer interior paint products for water damage restoration are more important than the paint. The primer or sealer will provide the necessary stain blocking elements to prevent any future discoloration caused by the existing water damage. Here is a link for a great oil-based stain blocking primer:
Here is a link for a wonderful sealer that will help prevent any bubbling paint caused from the existing water damage:
After all of the restoration is complete the new drywall can be painted with a Benjamin Moore ceiling paint. Here is a link for that product:
Lastly, if you have a painted concrete foundation or basement floor that has moisture issues here is a link for great waterproofing sealants for both surfaces: