This same effect happens when water gets into the ground under the pavement. If it has a chance to freeze, it will take up more space under the pavement, causing the pavement to expand, bend, and crack. This weakens the material pavement. When ice melts, the pavement contracts and leaves gaps or voids in the surface under the pavement, where water can get in and be trapped. If the water freezes and thaws over and over, the pavement will weaken and continue cracking.
As the weight of cars and trucks pass over the weak spot in the road, pieces of the roadway material weaken, which will cause the material to be displaced or broken down from the weight, creating the pothole.