What is corrosion?
Metal that has been extracted from its primary ore, has a natural tendency to revert to its natural state under the action of oxygen and water. This action is called corrosion, and the most common example is the rusting of steel.
Corrosion is a process of degradation of metals, thus losing it back to nature from where it were initially gained.
Corrosion is a costly problem. But by understanding its root causes, effective steps can be taken to prevent and combat it.
Iron ore and corrosion
Iron ore is a combination of minerals from which metallic iron can be extracted. Corrosion is the reverse process of metallurgy. In other words, the energy used to transform natural ore into a metal is reversed when the metal is exposed to oxygen and water.
Electrochemical cell
There are several forms of metallic corrosion, and most occur because of the electrochemical cell. The fundamental components in an electrochemical corrosion cell are anodic site, cathodic site, electron path (metallic connection) and ionic path (electrolyte). All four components must be present for corrosion to occur.
Read more about the galvanic series and nobility of metals.
Metal at the anode is oxidised causing it to lose mass, or corrode. The electrons produced due to this reaction travel to the cathode through the metallic path, consume in the reaction and prevent the cathodic area from corroding.
You may also read

The anodic reaction, consisting of the oxidation of the metal, can be given as Fe → Fe2+ + 2e–.
Oxygen( O2), which is highly soluble in the aqueous layer, is a possible electron acceptor. Oxygen reduction in neutral or basic media takes place according to the reaction O2 + 2H2O + 4e– → 4OH–.
Read more about the galvanic series and nobility of metals.

The anodic areas of a metal surface is oxidised and loses its electrons to the cathodic area. At the cathodic area the oxygen reduces and reacts with the oxidised metal to form metal oxide, so called rust.
You may also read about