Corrosion is defined as the destructive and unintentional degradation of a material caused by its environment.
Unfortunately for metals almost all environments can cause corrosion to some degree, since the corroded state is the more stable state.
A common type of corrosion is rust, which is found on iron and steel structures. In this type of corrosion, the iron is reacting with oxygen to form iron oxide compounds.
The oxygen can come from air or water. Iron oxide is actually more stable than pure iron or steel and therefore rusting is very common. Prevention of rust is actually a means of retaining a less stable, or higher energy, state.