How does water change states?
As the water molecules gain energy, they can escape from the attractions of their neighbours and change into a more fluid state.
All molecules attract each other. At the same time, all molecules are in constant motion. Their kinetic energies drive them apart.
At low temperatures, the kinetic energy of molecules is low. The molecules cannot move fast enough to get away from the attractions of their neighbours. They are “glued” in place so that they can vibrate only a little from side to side in a crystalline arrangement. The molecules are in the solid state.
At higher temperatures, the kinetic energy of the molecules is higher. The molecules have enough energy to slide past their neighbours. They do not have enough energy to escape the attractions of their neighbours. The system is in the liquid state.
At high temperatures, the kinetic energy of the molecules is high. The molecules can escape the attractions of their neighbours and move at will within the container. The system is in the gas state.
Thus, it is temperature that determines the changes of state of water.
Hope this helps.