Corrosion is the slow decay of pipes and fittings when the metal dissolves in water. Presence of dissolved gasses in water such as oxygen and carbon dioxide in natural water guarantees at least some corrosion will occur in pipes.
Water with acidic pH accelerates pipe corrosion since it provides more hydrogen ions.
High alkalinity can cause corrosion as well.