Rust is the result of a chemical reaction between iron and oxygen, otherwise known as iron oxide. Since steel wool -- and steel in general -- is largely made of iron, steel wool is prone to rust if it doesn't have a rustproof coating on it. The actual reaction that creates rust happens when two iron atoms mix with three oxygen atoms in water; the oxygen bonds to the metal, and a new compound is formed.
Even though air contains plenty of oxygen, steel wool doesn't rust if it just sits out on a counter. It actually takes hydrogen hydroxide, otherwise known as H2O or water, to create rust. When steel wool is wet, the water seeps into the metal's tiny gaps. The water serves as an electrolyte to allow the electrons from the oxygen to gravitate toward the iron. The hydrogen bond in the water acts as an acid that gives rust its corrosive properties. Since sodium quickens corrosion, saltwater is even more damaging to rusting metals. As steel wool corrodes, it gives off heat.
Since steel wool requires iron, oxygen and water to form rust, you can prevent steel wool from rusting by subtracting one part of the equation. This can be done by coating the steel wool with some type of substance to stop the oxygen and water from getting to it. If steel wool does rust, you may as well throw it out since removing the rust can be painstaking. Generally speaking, you don't want your metal to rust because the rust eats away at the metal and weakens it. Steel and iron aren't the only metals that rust: Aluminum can rust to form aluminum oxide.