"Magnesium has a very slight reaction with cold water, but burns in steam.
A very clean coil of magnesium dropped into cold water eventually gets covered in small bubbles of hydrogen which float it to the surface. Magnesium hydroxide is formed as a very thin layer on the magnesium and this tends to stop the reaction.
Magnesium burns in steam with its typical white flame to produce white magnesium oxide and hydrogen." - From Chemguide.
May I know why the reactions of Magnesium in steam and cold water differ?