Rust is the common name for a very common compound, iron oxide. Iron oxide (Fe2O3), is common because iron combines very readily with oxygen that pure iron is only rarely found in nature. Iron (or steel) rusting is an example of corrosion– an electrochemical process involving an anode (a piece of metal that readily gives up electrons), an electrolyte (a liquid that helps electrons move) and a cathode (a piece of metal that readily accepts electrons).
For iron to rust, three things are required: iron, water and oxygen.
When a drop of water hits an iron object, two things begin to happen almost immediately. First, the water, a good electrolyte, combines with carbon dioxide in the air to form a weak carbonic acid, an even better electrolyte. As the acid is formed and the iron dissolved, some of the water will begin to break down into its component pieces — hydrogen and oxygen. The free oxygen and dissolved iron bond into iron oxide, in the process freeing electrons. The electrons liberated from the anode portion of the iron flow to the cathode, which may be a piece of a metal less electrically reactive than iron, or another point on the piece of iron itself.
The chemical compounds found in liquids like acid rain, seawater and the salt-loaded spray from snow-belt roads make them better electrolytes than pure water, allowing their presence to speed the process of rusting on iron and other forms of corrosion on other metals.