Iron rusts because of its high chemical reactivity.
Chemical reactivity is a measure of the ease with which a substance tends to react when it is exposed to other substances. An element or a compound has high reactivity if it reacts readily with another substance.
Iron has a high chemical reactivity. It combines readily with oxygen — so readily, in fact, that iron ores usually consist of Fe₃O₄ and Fe₂O₃. Pure iron is rarely found in nature.
Rusting is an example of corrosion — an electrochemical process that involves a reaction between iron, water, and oxygen at low temperatures and produces a mixture of reddish-brown hydrated iron(III) oxides.
4Fe + 3O₂ + 2nH₂O → 2Fe₂O₃.nH₂O