How to predict what metals form when they react with water? For instance sometimes they form a metal oxide, but sometimes they form a metal hydroxide. How does this vary and why?
2 Answers
In general, the reaction of metals with water could produce either the oxide or the hydroxide. Roughly speaking, most metals are capable thermodynamically of displacing hydrogen from water to form the hydroxide, but in many cases you need such a high temperature to run the reaction that the hydroxide is not stable and thus we go over to the oxide.
To show the variety of possible reaction routes let's look at a few cases:
Iron
Iron does not react with water alone under ambient conditions; a simple reaction between iron and water requires steam at a high enough temperature to destabilize any hydroxides. You therefore get only oxides, generally $\ce{FeO}$ or $\ce{Fe3O4}$.
But if you add the supplemental oxidizing power of air, then iron can react with both the water and the air to generate rust -- a mixture of hydroxide and oxide compounds, or even oxide-hydroxides like $\ce{FeO(OH)}$ with iron(III). The hydroxides become possible precisely because the combination of air and water lowers the reaction temperature to make it so. See Wikipedia for a fuller explanation of the many reactions involved in the rusting of iron.
Magnesium and Calcium
Magnesium is something of an intermediate case between metals that clearly react with water alone at ambient temperatures and those that do not. Magnesium reacts slowly at ambient temperature, possibly generating enough hydrogen bubbles to temporarily float pieces of the light metal in the water. Reaction is faster in boiling water. In both of these cases the hydroxide $\ce{Mg(OH)2}$ is a stable product; but this decomposes at $350 \, \pu{^\circ C}$ From that temperature upwards, including burning the magnesium in steam, you will get $\ce{MgO}$.
Calcium more clearly reacts with water under ambient conditions to give $\ce{Ca(OH)2}$, but this also transitions to forming $\ce{CaO}$ as the hydroxide decomposes at $580 \, \pu{^\circ C}$.
Alkali metals
In general, alkali metals react so rapidly with water and the hydroxides are so stable that at least for all practical purposes, we expect exclusively the hydroxides.
The reaction of metals with water generally proceeds, for example, with aluminum, which has been slowly cleaned of its protective $\ce{Al2O3}$ coating via aqueous NaCl, as follows:
\begin{align} \ce{Al-NaCl &-> Al^3+ + 3 e-}\\ \ce{ H2O &<=> H+ + OH- }\\ \ce{H+ + e- &-> .H }\\ \ce{.H + .H &-> H2 (g)} \end{align}
Net reaction:
$$\ce{ 2 Al + 6 H2O -NaCl-> 2 Al(OH)3 + 3 H2 (g)}$$
Now, burning Magnesium, as another example, reacts with steam to create $\ce{MgO}$, but this due to the thermal decomposition of $\ce{Mg(OH)2}$:
$$\ce{ Mg(OH)2 + Heat -> MgO + H2O }$$
Find a source at bbc.co.uk.