The presence of oxygen, water and electrolytes leads to the iron being oxidized and hence rusted. It is further accelerated by the presence of salt and acids. But physically speaking, the rusting process does not spread like an infection. The oxidisation takes place independently based on the conditions surrounding the iron. If the iron is kept clean and dry, the protected layer of the iron will either not rust or will do so very slowly as compared to the wet metal.