Why doesn't hydrogen displace metals from their oxides? As I understand it, a displacement reaction is where a more reactive element kicks out a less reactive element from a compound.

For example, chlorine is more reactive than iodine, so chlorine will displace iodine from potassium iodide, yielding potassium chloride and iodine.

If magnesium reacts with water you get magnesium oxide and hydrogen. But hydrogen is generally a lot more reactive than magnesium, so isn't this backwards? The above paragraph predicts that hydrogen would displace the magnesium from magnesium oxide.

So why does it actually happen the other way round?
If magnesium reacts with water you get magnesium oxide and hydrogen.
  


True. So you can't put out a magnesium fire with water. It just burns hotter. 

$$ \ce{Mg(s) + H2O -&gt;T[aqueous] MgO(s) + H2(g) ^}$$


  
    But hydrogen is generally a lot more reactive than magnesium, so isn't this backwards?
  


No, in the above reaction you're reacting water with magnesium. The hydrogen is given off as a gas, though a tiny amount will stay dissolved in the water. 


  
    So why does it actually happen the other way round?
  


It will under suitable conditions. So with heat and under a pressurized flow  of hydrogen gas the reverse reaction will occur. 

$$ \ce{ MgO(s) + H2(g) -&gt;T[heat, pressure] Mg(s) + H2O(g) ^} $$