I just learned first hand what to do with frozen pipes. Couldn't stop it this year as it went so far below zero. On the last day before it warmed up one of the pipes split and put about 2ft of water into the basement. Amazing to see the damage to the CPVC pipe that broke -- like it literally exploded, which it probably did.
You should have a shutoff valve on every pipe that goes through an external wall. Before bitter cold like that, turn off the valve and drain that pipe. If it is supplying an outdoor spigot, that shutoff should just be part of your winter prep.
(And yes - I, too, learned that the hard way.)