Why does sodium react with water?
Alkali metals in general are extremely reactive metals. They are highly reducing in nature. Hence, they react with water forming their corresponding hydroxides evolving dihydrogen gas.

In case of sodium - as cited in your question - its reduction potential is $\pu{-2.7109 V}$ hence it easily reduces hydrogen.

Also, as the density of sodium is quite low it floats on the water. It immediately reacts with water to form a white trail of $\ce{NaOH}$ which further gets dissolved to give a colourless solution.

This reaction is highly exothermic evolving a lot of heat which is sufficient enough to melt sodium due to its low melting point.

Sodium moves in water as the dihydrogen gas formed below the waterline pushes sodium. If sodium is trapped in the container the increasing temperature could induce dihydrogen to catch fire.