The first thing you can do is get them to play with a toy. It's very important to keep your dog entertained, so make sure that you provide them with toys that they enjoy. Some dogs enjoy playing fetch, while others like chasing a ball or frisbee. If you're not around, a chewing toy should do the trick!
Dogs need to burn off energy, so make sure that you give them some time to exercise. If you don't have the time to play with them, take them for a walk! Don't leave them alone for too long or they may become bored and start doing things that are harmful to themselves or others.