If the dog has made a hole, use the dog's own feces (MUST be his/her OWN feces), and put it in the hole. Dogs hate the smell of their own feces and will never dig in that spot again.This is...
You have many option available to you. The most common would be called training. Whenever you notice a dog digging in the yard you must scold it so it knows it is doing something wrong. After a while...
You can stop your dog from doing this if you make sure he never does it as a puppy, or when he does it the first time you should catch him in the act right when he is doing it and with a loud voice...