This occurs due to heat exchange between the molecule of the hot and the cold liquid. When ice melts, it needs heat to melt. Thus it takes the latent heat of fusion from the surrounding water molecules resultingin the lowering of the average temperature of water.
So the water become cold