When something becomes cold or freezes such as water,it is releasing energy.The temperature continues to decrease more energy is given up and released.It stays a constant temperature as more energy is released to maintain the temperature needed to achieve the correct degree needed.