Here in Minnesota, we often have cold weather in winter. The temperature just dropped below 0ºF (-18ºC), and is not expected to get back above zero until sometime Tuesday. Saturday is expected to be -29ºF(-34ºC).
Generally, pipes are buried deep enough (6 feet/2 meters) to avoid the problem. Or people will leave the water running a bit so it is moving in the pipes. (Increases your water bill, but that’s a lot cheaper than calling plumbers.)
Problems generally occur in small locations, where pipes happen to be exposed to the cold. Most of these have been found & fixed by people over the years. You will often find ‘tricks’ that you have to follow in an old house.
In my mothers house, if it’s extremely cold and the wind is from the northwest, the cold water pipe to the upstairs bathroom will freeze inside the wall where it runs by the front entry. To prevent this, she either leaves the cold water running a little bit, or goes down to the basement and makes sure the door to the unheated pantry storage room under the front entry is open.
Another example is an old farmhouse on our west farm. This old building has very poor insulation, and the kitchen sink water pipes are ok in the ground, they actually freeze where they come up in the back of the kitchen cabinets. So years ago, a heat tape was applied to those pipes, and wire comes up thru a small hole on the counter where it can be plugged into an outlet. Unplug that during a cold spell and you’ll have trouble.
So most of the time, people have come up with stop-gap solutions for their own buildings.
Underground pipes can also be helped by snow, which is an insulation for them. It’s not uncommon to see the water pipe into your house from the street water main freeze right under the shoveled sidewalk. (But that can be fixed without digging up the yard. You call a welding company, they come with a portable welder on a truck, remove your water meter and clamp one wire to that, the other goes to the nearest fire hydrant. Apply current for about 10-20 minutes and it’s thawed.)
Often, underground pipes will freeze not in the coldest weather, but in the spring as things are thawing. What happens is that the ice/snow melts during a sunny day, and the water flows downward, deeper into the ground. Then at night it gets colder, and that water freezes. This is referred to as ‘frost moving deeper’, and can freeze pipes unexpectedly.