When a metal reacts with water, it is known as a metal hydroxide reaction. This reaction produces metal ions and hydroxide ions. The reaction is usually exothermic and can release enough heat to cause a spark. The products of this reaction are metal hydroxides, which are insoluble in water.
Magnesium react with water
Mg + 2H2O -> Mg(OH)2 + H2