Everyone knows that iron and steel will go rusty, becoming coated in a reddish orange crust that will, if left for too long, eat away at the metal to the point of weakening the metal severely. Rusting is the corrosion of iron and steel, as that is exactly what the rust is doing, corroding or destroying the metal through a chemical reaction.
Essentially, if water or moisture comes into contact with iron or an alloy of iron, such as steel, which hasn’t been protected by any form of coating such as paint, a chemical reaction takes place as the water causes the metal to react with oxygen in the air. This is because electrons from the iron atoms transfer across to the oxygen atoms. This produces an acid; iron oxide, which is just the chemical name for rust. As this reaction changes the chemical structure of iron or steel, over time the metal will deteriorate to a point where no more iron or steel is left, replaced instead by iron oxide or rust.
However, there are other kinds of rust, as concrete can also rust if it has been reinforced with metal reinforcing called rebar. Whilst the reinforcing bars might not be open to the air, the iron of the rebar can come into contact with chlorine as chlorides attack concrete, and the chemical reaction between the iron and chlorine will also produce rust, turning the concrete green.
The main factor which causes rust, then, is moisture. As such, to prevent iron or steel from rusting, the simplest way is to keep the material away from the elements or the ocean, but inevitably iron and steel are used to construct objects which are used outside all of the time, due to the strength of the materials. Pretty much anything you think of which is used outside, from tools to ships, are made from iron or steel. This is particularly bad news for ships, as the salt in salt water speeds up the reaction which produces rust, making ships very susceptible to rust.
By covering iron or steel with a coating, the problem of rusting or corrosion is immediately removed. If the moisture doesn’t touch the surface of the metal directly, the chemical reaction which produces iron oxide can’t take place, therefore the metal can no longer rust. This is why painting metal stops iron or its alloys from rusting. For the same reason, galvanizing iron or steel will prevent it from rusting. Zinc, used to galvanize steel or iron, doesn’t react with moisture and oxygen in the same way as iron, so acts to protect metal from the rusting reaction. Other metals such as aluminium or titanium will also serve to protect iron, but zinc is most commonly used due to the cheapness of the material. Other forms of coating, such as oil or wax, will also help to prevent rusting for the same reason.
The size of the piece of metal can also affect rusting, as the larger the piece of iron, the more likely it is to have small deficiencies from the smelting process which formed it into shape. The waste product of iron smelting is slag, and many different trace elements will be present in the iron, such as carbon. These small deficiencies can cause small flaws which make it easier for the rust to attack the metal. As thinner metal has generally been heated for longer in order to make it thin, thinner metal will have fewer deficiencies or flaws, so usually won’t rust as fast.
Any other form of acid will also cause iron or steel to rust. Even blood can cause steel to rust, as it contains iron, allowing oxidisation, the reaction which produces rust, to occur on the surface of the metal if no sort of protective layer is applied to the metal. This used to be an issue when swords were still used, as blood on the blade would almost instantaneously start the oxidisation reaction, pitting the steel of the blade with small spots of rust as the iron in the blood reacting on the surface ate into the blade.
So, rust can fairly easily be prevented if the factors which cause rusting are taken into account. Something as simple as painting iron can prevent the rusting, saving the metal from the corrosion it would otherwise be subject to.
References
Smith, Chris, (2003) the Lord of the Rings: Weapons and Warfare, Harper Collins.