Many times we have seen reddish brown flakes on the metal. This is known as rust. When iron reacts with oxygen it forms a new substance called iron oxide. This can happens only if the oxygen level is enough for reaction. Chemical reaction takes place in this process. Iron never reacts with the oxygen present in the air because there it moves in the combined state with other oxygen and here oxygen is not capable to react, so why the iron gets rusted? Oxygen present in the air when dissolves in water it gets separated from the other oxygen and moves on its own way. Hence does not remain in combined state. Now iron can react with oxygen in its singular state. So we can say that metal gets rusted only when oxygen, moisture, and iron react with each other. The brown coating which is hydrated ferric oxide and commonly known as rust. Rusting makes the metal weak enough so that it can be easily broken.
If salts are added to the mixture then this reaction can be speeded up. The iron oxide which is formed is porous and bulky which allows iron and oxygen to further react causing more oxidation. If this oxidation is not halted here only then whole of the metal can change to ferric oxide or rust and it becomes so weak that it can be broken easily.
We can prevent metal from getting rusted by not allowing the water and oxygen mixture to come in contact with iron or by coating the iron with oil, grease, paints etc. if these coating wipes off the iron can begins to rust again.