Changes in State
Liquids change to gas as thermal energy is absorbed. In the case of water, the amount of thermal energy that must be absorbed is equal to 2260 kJ/kg. This means that for every kilogram of water that is to change from a liquid to a gas (water vapor), that liquid must absorb a minimum of 2260kJ (2,260,000 J) of thermal energy. This is called its' "Heat of Vaporization."
As liquids change to a solid, it must release or give off to the environment, thermal energy. In other words, it looses heat. In the case of water, for liquid water to change into ice, it must release to the environment 334 kJ/kg of energy. That is for every kilogram of water that is to be frozen, 334 kJ (334,000 J) must be removed. This is what a freezer does. It removes that heat into the area that surrounds the freezer.
Phy. Science Main Page