Pipes freeze when the water inside is cold enough to solidify. In extremely cold weather, pipes can freeze in a matter of minutes. If water is flowing through the pipe it requires a lot more work to make it freeze and is not very common. In a home a pipe is likely to freeze if it is near outer walls, low to the ground, gaps in insulation or where air flow from the outside is possible.
Usually only a small section of the pipe freezes. Water expands as it freezes; the expansion starts by increasing in length along the pipe. If the pipe has bends in it, the ice that forms is less likely to expand away from the cold. A section of water can become trapped and the pressure in that section increases, once the pressure is too high the pipe will burst.
A few tips to Prevent pipes from freezing: Leave tap open/dripping on pipes that freezing could occur. Leave the space around the pipes as open as possible. Ensure your heat is on I all areas of you home. Insulate all areas of your home well. If the temperatures decrease a additional heater may be needed.