To understand how rust remover works, you need to understand the makeup of rust. Rust is a chemical compound known as iron oxide, which is a mixture of iron and run of the mill oxygen found in the air. It can not only make metal objects look ugly, but it can do a number on their structural integrity. Rust can also spread to other objects when they come in contact with rusted metal. This is most likely to happen on pipe fittings and other items that touch metal as part of their design, but rust can get on anything from a t-shirt hung on a metal fence to a kitchen tile with a rusty nail left to sit on it. But the rust will have to be on a metal object to oxidize further and spread.
A chemical reaction
Most rust removers clean the rust off of objects by changing the molecular structure of the rust via a chemical reaction. There are dozens of these solutions available commercially, but the most common contain phosphoric acid, oxalic acid or another acidic substance, such as vinegar. These acidic compounds bond with the iron oxide to change its chemical makeup. For example, the phosphoric acid converts the iron oxide to iron phosphate, a considerably weaker acid. The oxalic acid works to neutralize the acid completely. Both are successful in ridding the rust of its corrosive properties. In most cases, the rust can be rinsed off with water after this change takes place since the bonds with the surface are altered.
Bonding and scrubbing
Some rust removers, such as those used solely for surface stain, contain baking soda, soap or a lime-based liquid. These cleaners work by mixing with the stain and eventually absorbing it. Hence, when you wipe the cleaner off of the surface, you are wiping off the rust as well. These cleaners rarely work well on metal, unless the rust spot is new and very, very small.
A note and warning
Most rust can be removed using one of the two methods above, but this does not mean that the structural integrity of the object is automatically restored to what it was originally. For instance, if you have a rusted out ladder and you clean the rust off of it, that doesn't mean that the ladder is now safe to use when it wasn't before. Rust remover can fix things aesthetically but it is not by any means a miracle cure.