Burning of magnesium is a combination reaction as magnesium combines with oxygen to give magnesium oxide.
2Mg(s)+O2(g)→2MgO(s)
Heating of calcium carbonate gives calcium oxide and carbon dioxide, which is a decomposition reaction.
2CaCO3(s)→2CaO(s)+CO2(g)
When magnesium is treated with HCl, it displaces hydrogen from HCl and forms MgCl2. Hence, it is a displacement reaction.
Mg(s)+2HCl(aq)→2MgCl2(aq)+H2(g)