If a pipe bursts, immediately shut off the main water supply to minimize water damage. Turn off electricity in affected areas if it is safe to do so, remove valuables from the area, and contact an emergency plumber as quickly as possible to make repairs.