Corrosion is the gradual destruction of a metal by reaction with substances in its surroundings. For most metals it is oxidation: the metal reacts with oxygen and forms a metal oxide on its surface.
The corrosion of iron and steel is called rusting. Iron needs both oxygen and water to rust. The word equation is iron + oxygen + water → hydrated iron(III) oxide. Hydrated iron(III) oxide is rust. It is orange-brown and flaky, so it falls off and exposes fresh iron, and rusting continues. Rusting is faster in salt water, which is why cars rust quickly where roads are salted.
You can test the conditions with three nails. A nail in water that is in contact with air rusts. A nail in boiled water with a layer of oil on top does not rust because there is no oxygen. A nail in dry air with a drying agent such as calcium chloride does not rust because there is no water.
Other metals corrode too, but only iron rusts. Aluminium forms a thin layer of aluminium oxide that sticks tightly to the surface and stops further reaction, so it is protected. Copper slowly develops a green layer.