As far as preventing this catastrophe, the best option, if the temperatures are going to be below 20° for longer than 8 hours, is to drain the system completely. This is achieved by turning off your main water shut off valve, opening every fixture inside the home, and all the hose spigots. If you have access to an air compressor, it's an even better idea to use that to blow all the water trapped inside the pipes after turning the water off and draining the residual.
If the temperature is between 20° and 30°, letting a faucet run with a small stream of water is good along with covering your outside spigots. If your pipes are in the attic, you can open your attic door and keep the heat running to keep the attic above 32° along with cabinet doors below sinks. If your home is a pier and beam style with the water pipes running under the framework of the home, the use of electric space heaters can help along with closing off any openings around the perimeter, especially on the north side of the home. Insulating the exposed pipes is also essential to preventing the potential of freezing.
If you're going to be out of town during a potential freeze, I highly recommend turning your water off, regardless of what the expected temperature may be, and draining the system. (I recommend this regardless of a freeze when leaving town for more than a couple days). I can't tell you how many homes I have been to where people came back after a long trip to a flooded home. Knowing where your main water shut off is and confirming it works is very important for homeowners.