Corrosion: the gradual destruction of metal due to a chemical or electro-chemical reaction to the environment. Or, to look at a case you’re probably more familiar with, metal that rusts because of the presence of water. There are different types of corrosion, but when we’re talking about a residential water heater, it’s the corrosion that occurs because of the mix of oxygen and water in contact with metal.
A water heater is designed to resist corrosion through a number of methods. The interior of its hot water tank is lined with glass. A pressure relief valve on the top of the tank allows for an air cushion without allowing air into the tank itself. A component called the sacrificial anode rod that runs through the tank draws the forces of corrosion to it so that the rod corrodes rather than the rest of the tank.
However… yes, a water heater can start to corrode. If you notice corrosion on your water heater, does it mean the system has to be replaced?