This is an oxidation-reduction (redox) reaction:
2 Mg0 - 4 e- → 2 MgII (oxidation)
2 O0 + 4 e- → 2 O-II (reduction)
Mg is a reducing agent, O2 is an oxidizing agent.
Reactants:
Products: