If we take a hot dish and put ice cream in it, it cracks because the dish when hot has expanded. All the tiny particles that make up the dish have absorbed some heat and have expanded. When the ice cream is put in the particles composing the inside of the dish are cooled off and begin to contract, while the outside particles have not cooled and they pull away from each other, causing the dish to crack.