Lay down a thick layer of newspaper below the area to be painted.
Remove corrosion, which looks like white stains, with 1 tbsp. white vinegar in 1 c. water. Apply it with a soft cloth.
Follow the vinegar solution with 1 tbsp. baking soda dissolved in 1 c. water; this will neutralize the vinegar.
Rinse the pipework three or four times with fresh water.
Go over the entire pipe surface with steel wool dipped in mineral spirits. This will rough up the surface just enough while removing any oils, grease, or grime that has accumulated.
Allow the pipe to dry completely.
Paint the pipes with your choice of paint (see Related eHows).