Because iron is so widely used, e.g., in building construction and in tools, its protection against rusting is important. Rust is brittle and flakes off the surface of the iron, continually exposing a fresh surface. Rusting can be prevented by excluding air and water from the iron surface, e.g., by painting, oiling, or greasing, or by plating the iron with a protective coating of another metal. Metals used for plating include chromium, nickel, tin, and zinc. Zinc plating is called galvanizing.
Many alloys of iron are resistant to corrosion.
The iron hulls of ships can be protected against rusting by attaching magnesium strips to the underside of the vessel. An electric current is generated, with the magnesium and iron acting as electrodes and seawater acting as the electrolyte. This is called cathodic protection, since the iron serves as the cathode and thus escapes oxidation. This method is also used to protect the pipes of electric generating plants where saltwater is used as a coolant. The Columbia Encyclopedia, Sixth Edition.