Answer:
Chemical energy to heat energy
Step-by-step explanation:
Magnesium metal when exposed to flame, it react with the oxygen in air to form white colored powered, known as magnesium oxide with the evolve of heat.
The balanced chemical reaction is shown below as:-

In the reaction the chemical energy which is stored in the chemical bonds of the magnesium and oxygen gas releases which makes the molecules surrounding the system gets heat up and thus, changes to thermal or heat energy.
Thus, The burning of magnesium involves a conversion of chemical energy to heat energy.