Energy is absorbed when a solid turns into a liquid, and released when the reverse occurs.
When water freezes, it expands, unlike most other substances. Use a thermometer if one is available. Ice cools the warm water much more because it absorbs heat in order to melt. Place a cup of water in a freezer and check temperature every ten minutes. It will quickly cool to the freezing point, but takes much longer to freeze because heat must be removed to make it change state.