Galvanising is a method of rust prevention. The iron or steel object is coated in a thin layer of Zinc. This stops oxygen and water reaching the metal underneath.
By applying oil, grease or paint, the surface becomes water proof and the moisture and oxygen does not come in direct contact of Iron.