Steel is an iron alloy, and since iron rusts, so does steel wool. Rust forms when iron (or certain other metals), oxygen and water mix. The chemical reaction in which iron and oxygen bond together to form rust is what ends up causing the metal to corrode and weaken. Galvanized steel was invented to combat the harm rust causes to metal. The idea behind galvanized steel is twofold: to protect the metal from coming in contact with water and oxygen and to be a first sacrificial line of defense against corrosive elements.
To galvanize steel, it's dipped in a bath of melted zinc and then allowed to dry. This super-thin layer of zinc mixes with the air to form zinc oxide and is what creates a barrier between the steel, oxygen and water. In addition, the zinc is the first to go when corrosive elements try to attack galvanized steel. That means that eventually, the galvanized layer of protection disappears, and the steel below becomes exposed. Sometimes, a white powder seems to take over galvanized steel and galvanized steel wool. This "white rust" is a reaction between the zinc that somehow never oxidized in the galvanization process and impurities in water such as phosphate or carbonate. Zinc carbonate is the most common product of this type of reaction. The white rust eats away at the zinc and ends up leaving the steel vulnerable to water and oxygen. So galvanized steel doesn't rust as quickly as regular steel wool, but it does rust eventually.
Stainless steel works on a similar principle; it's made of a whole slew of elements including iron, chromium, manganese, silicon and carbon. Like the zinc in galvanized steel, these elements, particularly the chromium, react with the water and oxygen that would normally rust the iron to form their own protective coating.