There exist a liquid like layer over the ice crystal surfaces even when the temperture is less than 0°C.
This layer is known as quasi liquid layer. The phenomenon in which ice cubes stick together is known as regelation.
This liquid layer between the close ice cubes solidifies and sticks together. The temperature of the ice cube transfers to the liquid layer untill the temperature of the ice cubes drops to freezing point . Hence when the tempertaure of the ice and liquid layer becomes equal to zero degree, the liquid layer itself becomes ice and sticks to each other.
Thus we can say that when ice cubes are brought closer, the liquid layer on the ice surface freezes and connects both the ice cubes together.