Magnesium burns very easily in the air to form magnesium oxide and this reaction needs an external source of energy. Magnesium metal is being oxidized to its metal oxide state, so it undergoes oxidation. This is an example of a combination reaction as well.
2Mg+O2→2MgO