Corrosion is the deterioration of the materials, the corrosion resistance depends on the environmental agents and the chemical composition of the material. The corrosive media can be environmental (acids, salts and alkalis) (oxygen, pollution, acid rain) and fresh or salt water.
Corrosion can affect an entire surface or can be localized, as in "pitting", it can take place along the grain edges of metals (intergranular corrosion).
It can also happen that two different metals form a galvanic cell and therefore cause Galvanic Corrosion.