Rust is the common name for a very common compound, iron oxide. Iron oxide, the chemical Fe2O3, is common because iron combines very readily with oxygen -- so readily, in fact, 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). When a piece of metal corrodes, the electrolyte helps provide oxygen to the anode. As oxygen combines with the metal, electrons are liberated. When they flow through the electrolyte to the cathode, the metal of the anode disappears, swept away by the electrical flow or converted into metal cations in a form such as rust.
For iron to become iron oxide, three things are required: iron, water and oxygen. Here's what happens when the three get together:
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.
Here are some interesting links: