Why does metal rust?
Metal rusts because iron reacts with oxygen and water to form iron oxide, the flaky reddish-brown substance we call rust. Strictly speaking, only iron and alloys that contain iron, such as steel, rust.
Rusting is a type of corrosion. It is an oxidation reaction: iron atoms lose electrons to oxygen, slowly turning the strong metal into a weak, crumbly compound.
What rust needs
Both oxygen and water are needed. Iron kept in completely dry air or in water with no dissolved oxygen rusts very slowly.
Salt speeds up rusting, because salty water conducts electricity better. That is why cars rust faster in places where salt is spread on winter roads, and why ships and coastal structures need protection.
Why rust spreads
Unlike some metal oxides, rust does not form a tight protective layer. It is porous and flakes off, exposing fresh iron underneath so the process continues.
Other metals
Other metals corrode in different ways. Aluminum forms a thin, tough oxide layer that protects it. Copper slowly turns green, forming a coating called patina, as on the Statue of Liberty.
Preventing rust
Paint, oil and plastic coatings keep air and water away.
Galvanizing coats steel with zinc, which corrodes first and protects the iron.
Stainless steel contains chromium, which forms a protective layer and resists rust.