2 Mg0 + CIVO2 2 MgIIO + C0

This is an oxidation-reduction (redox) reaction:

CIV + 4 e- C0 (reduction)

2 Mg0 - 4 e- 2 MgII (oxidation)

Change the oxidation states