When a metal reacts with water, a metal hydroxide and hydrogen are formed.
Sodium reacts vigorously with water.
sodium + water ➞ sodium hydroxide + hydrogen
2Na(s) + 2H2O(l) ➞ 2NaOH(aq) + H2(g)
Calcium reacts readily with water.
calcium + water ➞ calcium hydroxide + hydrogen
Ca(s) + 2H2O(l) ➞ Ca(OH)2(aq) + H2(g)
Calcium hydroxide is slightly soluble in water so once the solution is saturated, it starts to become milky as solid calcium hydroxide appear.
The apparatus below is used to react calcium with water and collect the gas. This would not be used with sodium or potassium as they float and the reaction is too vigorous.