The above reaction takes place in the presence of moisture.
4Fe(s) + 3O2(g) → 2Fe2O3(s)
In this reaction, the oxygen is taking away 3 electrons from each iron to produce Fe3+ ions. This is a synthesis reaction, where 2 reactants combine to form a single product.
Rusting or corrosion is a redox reaction in which the metal atoms oxidize to metal ions.
The chemical equation is simply 4Fe + 3O2 + 6H2O → 4Fe(OH)3.