The answer is hydrogen bonding
To know how, first, we have to know that how much the molecules of the substance are moving relative to another one by measuring the temperature. when the temperature gets higher the more molecules are moving. all these moves of the molecules take energy.In our case, we are talking about the pure water H2O the reason that makes the more energy used to get the molecules of water moving and raising the temperature is that the molecules of water are sticking together tightly, As the water molecules are very polar. One side is negative charge O- and the other is a positive charge H+ (It's just like a magnet).So the attraction between the water molecules makes the movement of those molcules harder to move. So to break this attraction, we need more energy to raise the water temperature to change the water phase from solid (ice) to liquid phase.