Barking behaviour is normal for dogs - dogs bark for lots of reasons, and it's a way for them to communicate with each other and with us. Some breeds tend to bark more than others, and as pet owners, we sometimes unintentionally reinforce barking behaviour even when it drives us crazy. You can teach a dog to stop barking inappropriately but it takes time and patience.
If you give in and turn your attention to the barker, you are rewarding him for barking. Ignore him instead. Reward him when he's quiet.
If your dog gets over-excited and begins to bark excessively, stop play immediately and let him calm down.
Do not soothe your dog or in any way indicate that there really is something "scary" that the dog needs to be anxious about. Reinforcing the barking in this way may cause your dog to bark even more the next time (and it'll make it harder to teach him to stop when you ask him to).
Use a command to indicate to your dog that he should stop barking, for example some people use the cute, "Enough!". Say it in a firm, calm, low tone of voice and be consistent. Praise your dog when he is quiet. Don't lose patience - it takes time to reinforce the right behavior.
Make sure your dog gets plenty of exercise (a tired dog is a happy dog!). You can also provide him with some form of stimulation. A good example is one of the Kong toys. These are rubber, tiered toys with a hole through the middle. You stuff them with little bits of treats (many dogs like a smear of peanut butter, too). Dogs can spend a lot of time gnawing on the toy and occasionally getting a small tasty reward as the treats are gradually worked out.
This type of barking behaviour can be difficult to manage. Consulting with a dog training professional may be a good way to determine the best method of modifying or controlling anxiety barking.
Barking dogs can become a real problem for not just the family, but also the neighbors. If your dog's barking behavior becomes excessive and you find it difficult to modify his behaviour, engage the services of a qualified dog trainer or behaviorist. These dog professionals can show you positive ways to manage dog behavior problems while still maintaining or strengthening the bond between you and your dog.