My name is XXXXX XXXXX me to explain this.
So iron could be considered relatively "reactive"
So when moisture(water) comes in contact with iron, water is a great electrolyte so it begins to form carbonic acid(very weak though) from the reaction with the air... just sidenote, this is the same reason water begins to taste a little "sour" when left out. So this carbonic acid is an even better electrolyte(just like batteries use acids).
This mild acid dissolves the iron(as any acid would) and when this happens that is then broken into hydrogen and oxygen. The available oxygen then bonds with the dissolved iron making IronOxide. The free electrons from the previous process that go to the positively charged cathode.
That is how rust happens, its because of the availability of oxygen from the reaction, but basically because of the mild "acidic" compound formed from the moisture in the air.
Corrosion is a general term that is often inter-used with oxidation, but slightly different from galvanic corrosion, corrosion between a couple of different metals.
Please remember to rate the answer if it helped it costs you nothing additional - if you need more information just hit reply.