At anode, Fe is oxidised to Fe(II) ions and at cathode oxygen is reduced to water. The overall reaction is
2Fe(s)+O2(g)+4H+(aq)→2Fe2+(aq)+2H2O(l)
Fe(II) ions are further oxidised to Fe(III) ions.
4Fe2+(aq)+O2(g)+4H+(aq)→4Fe3+(aq)+2H2O(l)
Fe(III) ions form an insoluble hydrated oxide which is deposited as red brown material called rust.
2Fe3+(aq)+4H2O(l)→Fe2O3H2O(s)+6H+(aq)