In corrosion, a metal is oxidised by loss of electrons to oxygen with the formation of oxides. So, an electrochemical cell is set up. Eg: Rusting of iro involves the following steps :
i) The water layer present on the surface of iron dissolved acidic oxides from air like `CO_(2)` and forms acid to produce `H^(+)` ions.
`H_(2)O +CO_(2)H_(2) CO_(3)hArr2H^(+)+CO_(3)^(2-)`
ii) I the presence of `H^(+)` ions, iron starts losing electrons at some spot to form ferrous ions. This spot behaves as anode.
`Fe(s)overset("Oxidation")rarrFe_((aq))^(2+)+2e^(-), [E_((Fe^(2+)//Fe))^(@)=-0.44 V]`
iii) The electronic released at anode move to another spot, where `H^(+)` ions and the dissolved oxygen gain these electrons. This spot becomes a cathode.
`O_(2(g))+4H_((aq))^(+)+4e^(-) overset("Reduction")rarr2H_(2)O_((l)),`
`[E_((H^(+)//O_(2)//H_(2)O)^(@)=1.23 V]`
iv) Overall reaction, i.e., redox reaction is :
`2Fe_((s))+O_(2(g)) +4H_((aq))^(+) rarr 2Fe_((aq))^(2+)+2H_(2)O_((l)), [E_("cell")^(@)=1.67 V]`
v) Ferrous ions are further oxidised by the atmospheric oxygen to ferric ions which combine with water molecules to form hydrated ferric oxide, `Fe_(2)O_(3). xH_(2)O`. (Rust)
Oxidation `:Fe_((s))rarr Fe_((aq))^(2+)+2e^(-)`
Reduction `:O_(2(g))+4H_((aq))^(+)+4e^(-) rarr 2H_(2)O_((l))`
Atmospheric oxidation `:2Fe_((aq))^(+)+2H_(2)O_((l))+(1)/(2)O_(2(g))rarr Fe_(2)O_(3(s))+4H_((aq))^(+)`