Fill the top 2 inches or so with dirt. The dog finds the stuff, gets discouraged and often quits digging. They seem to get the idea they'll never know where they'll find junk, and it's not worth the effort to dig only to find junk so they quit. The Koehler dog method advocates filling holes with water and sticking dog's head under the water for a few seconds or so. Designate an area where the dog can dig.
Many people build a sand box for their dog.
Place the box in an area that is cool in summer and warm in winter. Encourage the dog to dig up the toy or treat. Praise the dog. Repeat until the dog willingly jumps in and digs. Watch the dog.