Corrosion of iron is essentially an electrochemical phenomenon where the cell reactions are
Anode:Fe(s)→Fe2+(aq)+2e− Cathode:4H++O2+4e−→2H2O
Corrosion is an electrochemical process in which oxygen loses electron and metals gain them.