What Makes Iron Rust?

Metals exists in nature in impure form of ores. During extraction, they gain lots of energy. Hence pure metal is at high energy level. Every substance tries to get state of low energy. Hence it readily reacts with atmospheric elements and gets rusted.