2 Mg0 + O20 2 MgIIO-II

This is an oxidation-reduction (redox) reaction:

2 Mg0 - 4 e- 2 MgII (oxidation)

2 O0 + 4 e- 2 O-II (reduction)

Change the oxidation states