Magnesium reacts with everything in the air....yea..literally everything, except noble gases . It forms Magnesium carbonate with CO2, Magnesium oxide with O2, magnesium nitride with Nitrogen, Magnesium hydride with H2, magnesium oxide with water vapour, and so on.
But, Nitrogen is fairly inactive, So Mg3N2, magnesium nitride is formed in traces only. Atmosphere has very low amounts of CO2, H2 and H2O. So, again, their corresponding products are found only in traces. But we have about 30 % oxygen in atmosphere, and O2 is quite more reactive than N2, so MgO, magnesium oxide is the most prominent product formed.
When Mg pure ribbon is exposed to atmosphere, most likely product is MgO, due to abundance of O2,, and high reactivity. So, MgO forms a coating on surface of metal. MgO is non combustible.So, we clean it to remove MgO, so pure Mg can burn easily in air.
There will be traces of carbonate and nitrides, but it is in very small amount.