Why does water become cold if we add some ice cubes in it?
Isolated systems spontaneously evolve towards thermal equilibrium—the state of maximum entropy of the system.
What is going on at the atomic level is that atoms and molecules are bouncing around faster when hot as opposed to slower when they are cold. As the faster moving H2O molecules in the water bang into the slower moving molecules in the ice they jostle and speed up some of the ice molecules while losing some of their speed/energy.
Also, some of the ice will undergo a phase change, from solid to liquid. This melting phase change is an endothermic process requiring and absorbing energy drawn the the temperature of the water.