The behavior of digging
helps of dog to survive in the wild nature. They can dig for many reasons - to hide food, to find prey, to find a cool place, to find a safety place to rest and others. Whatever is it the reason is unpleasant to see the yard dug or the home damaged.
Depending on the dog breed there is some who has strong instinct for digging. There are methods to prevent this behavior who you need start practicing in the beginning when your dog makes s first trial to dig.