BARKING

Here's a list of six techniques that can help stop your dog from barking. While all of them can be very successful, you shouldn't expect miraculous results overnight. The longer your dog has been practicing the barking behavior, the longer it will take for him to change his ways.
Some of these training techniques require you to have an idea as to why your dog barks. 
Always remember to keep these tips in mind while training:

1. Remove the motivation

Your dog gets some kind of reward when he barks. Otherwise, he wouldn't do it. Figure out what he gets out of barking and remove it. Don't give your dog the opportunity to continue the barking behavior.
Example: barking at passersby

2. Ignore the barking

Ignore your dog's barking for as long as it takes him to stop. That means don't give him any attention at all while he's barking. Your attention only rewards him for being noisy. Don't talk to him, don't touch him, and don't even look at him. When he finally quiets, even to take a breath, reward him with a treat.
To be successful with this method, you must wait as long as it takes for him to stop barking. If he barks for an hour and you finally get so frustrated that you yell at him to be quiet, the next time he'll probably bark for an hour and a half. He learns that if he just barks long enough you'll give him attention.
Example: barking when confined

3. Desensitize your dog to the stimulus

Gradually get your dog accustomed to whatever is causing him to bark. Start with the stimulus (the thing that makes him bark) at a distance. It must be far enough away that he doesn't bark when he sees it. Feed him lots of good treats. Move the stimulus a little closer (perhaps as little as a few inches or a few feet to start) and feed treats. If the stimulus moves out of sight, stop giving your dog treats. You want your dog to learn that the appearance of the stimulus leads to good things (treats!).
Example: barking at dogs

4. Teach your dog the "quiet" command

It may sound nonsensical, but the first step of this technique is to teach your dog to bark on command. Give your dog the command to "speak," wait for him to bark two or three times, and then stick a tasty treat in front of his nose. When he stops barking to sniff the treat, praise him and give him the treat. Repeat until he starts barking as soon as you say "speak." Once your dog can reliably bark on command, teach him the "quiet" command. In a calm environment with no distractions, tell him to "speak." When he starts barking, say "quiet" and stick a treat in front of his nose. Praise him for being quiet and give him the treat.
Example: someone at the door

5. Ask your dog for an incompatible behavior

When your dog starts barking, ask him to do something that's incompatible with barking. Teaching your dog to react to barking stimuli with something that inhibits him from barking, such as lying down in his bed.
Example: someone at the door

6. Keep your dog tired

Make sure your dog is getting sufficient physical and mental exercise every day. A tired dog is a good dog and one who is less likely to bark from boredom or frustration. Depending on his breed, age, and health, your dog may require several long walks as well as a good game of chasing the ball and playing with some interactive toys.