Dogs don't have hands to explore the world around them, so they use their mouths. Most puppies go through a teething stage where anything and everything is a chew toy; while this is frustrated and sometimes destructive, there are easy and healthy ways to channel your dog's desire to chew. Even older dogs can go through phases where your shoes or a table leg might seem like a tasty thing to try; fortunately, there are some tried and true methods that will discourage any dog and save your furniture.
The first part of getting your dog to stop chewing on something he's not supposed to is to remember that chewing is a natural part of a dog's drive. Getting a dog is getting a pet that will chew; it's your job to teach him the right and wrong way to exercise his desires.
Make sure he has plenty of toys and rawhides available that are ok for him to chew on. A variety will help keep him from getting bored; when you catch him chewing what he's not supposed to be, redirect him to something more appropriate. When he shows interest in his own toys, be lavish with the praise. Chewing on things he's not supposed to can also be a way to get attention. Much the same as children, puppies who are often ignored may find that bad attention is better than no attention, and may begin chewing things just to get noticed.
Boredom is one of the biggest causes of unwanted chewing in both puppies and older dogs. Make sure your dog has plenty of social time and play time. When he is confined to his crate, puzzle toys and Kongs can be great ways to keep him occupied.
Form good habits while you're there. Once a behavior is ingrained in your dog, he'll be much more likely to behave while he's not under your watchful eye.
If you have an older dog that still insists on chewing things he shouldn't be, take a step back and look at it from his perspective. Is there something in particular he's attracted to, such as shoes or articles of clothing? If he's constantly chewing something like this, he may be attracted to it because of your scent. Your scent on your clothes isn't necessarily marking it as yours, he may be chewing on it to comfort himself in times of loneliness.
Never, ever give your dog chew toys that could be mistaken for something else. Don't give him old shoes to chew on and expect him to be able to tell the difference between the old ones he's being given and the new ones you've just bought. Make sure his acceptable toys are distinctly his.
Disciplining him for chewing something while you were away at work isn't effective. He'll have no idea why you're mad at him, and he may even start to associate your presence with getting in trouble. When he can't be supervised, contain him in a crate or room where he can't fail at being good.