Buildings insurance pays out if your property is accidentally damaged or destroyed. Most polices cover damage to your home caused by events such as fire, lightning, and storms. Subsidence is usually covered as well but check with your insurer as this may depend on where you live.
Most mortgage lenders suggest that you take out buildings insurance with them, although you don't have to take out a policy out with your mortgage lender and are free to shop around.