Electrochemical corrosion is a oxidation-reduction reaction in which electrons in a metal are transferred to an electron acceptor, resulting in oxidation of the metal. The electrons migrate through the metal itself, so two different areas of the metal act as the anode and cathode, respectively. There must be water or another electron acceptor present for this to occur. Some factors that increase the rate of electrochemical corrosion are:
Presence of water and/or oxygen, both of which are electron acceptors
Impurities in the metal - oxides of other metals can act as electron acceptors
Temperature - most reactions take place faster at higher temperatures
Presence of salt/electrolyte - this increases the conductivity of water
Lack of protective coating on metal - this allows oxygen to come into contact with the metal and act as an electron acceptor
Contact with dissimilar metal - when two metals are in contact in the presence of moisture they will act as an anode and cathode to allow water to oxidize the more active metal.