I was taught this as a kid, why you nevr pour hot water over frozen screen etc, risk of cracking. here is he answer.
What Actually Happens
There are several things that help the hot pail freeze faster than the cold pail. Here are what is thought to be the most significant factors:
The hot water is more likely to be supercooled. This means that the hot water's temperature is more likely to cool to temperatures below zero degrees Celsius. In the cold non-supercooled water, ice crystals form and float to the top, forming a sheet of ice over the top of the water, creating an insulating layer between the cooler air and the water. This ice sheet also stops evaporation. In the hot water that has become supercooled (thus, no longer hot) the water, when it does freeze, freezes throughout, creating more or less of a slush before freezing solid.
Why is hot water more likely to be supercooled? Because hot water is less likely to contain tiny gas bubbles. Gas bubbles form from dissolved gasses as the water cools. When the hot water was heated, these dissolved gasses may have been driven out. In cold water, ice crystals use the tiny bubbles as starting points for formation (in physics, we call them nucleation points). But in the hot water, there are no bubbles, so there aren't as many starting points for the ice crystals.
Here is more. in easy to understand terms.
The phenomenon that hot water may freeze faster than cold is often called the Mpemba effect. Because, no doubt, most readers are extremely skeptical at this point, we should begin by stating precisely what we mean by the Mpemba effect. We start with two containers of water, which are identical in shape, and which hold identical amounts of water. The only difference between the two is that the water in one is at a higher (uniform) temperature than the water in the other. Now we cool both containers, using the exact same cooling process for each container. Under some conditions the initially warmer water will freeze first. If this occurs, we have seen the Mpemba effect. Of course, the initially warmer water will not freeze before the initially cooler water for all initial conditions. If the hot water starts at 99.9°C, and the cold water at 0.01°C, then clearly under those circumstances, the initially cooler water will freeze first. However, under some conditions the initially warmer water will freeze first -- if that happens, you have seen the Mpemba effect. But you will not see the Mpemba effect for just any initial temperatures, container shapes, or cooling conditions.