Depending on the circumstances, hot water can actually freeze faster than cold water. However, this is not always the case, as a large number of variables affect how fast water freezes, including the shape of the container, the cooling conditions and the specific water temperatures.
This phenomenon of hot water freezing faster than cold is known as the Mpemba effect, named after a Tanzanian high school student who documented this experiment in 1969. However, this was actually a rediscovery of the phenomenon, as famous scholars like Aristotle, Rene Descartes and Sir Francis Bacon had also recorded its existence.
Although scientists are aware of the phenomenon, there is still no definitive answer as to why it occurs since many different factors can play a role under certain circumstances. One theory is that the warmer water's quicker rate of evaporation may be at least partly responsible. Another possibility is that the hot water's lowered ability to contain absorbed gases may speed its freezing. It may also be due to the fact that cold water experiences a strong supercooling effect, which makes it more difficult for it to turn into solid when it reaches its freezing point. One final possibility is that convection allows the warmer water to lose its heat faster than the colder water.