According to WebMD's Healthy Dogs Guide, excessive barking in dogs can be traced to anxiety, boredom or excitement. Additionally, dogs will often respond to other dogs barking within the vicinity. More barking than usual can be a sign of attention-seeking behavior, though it's important to note that certain breeds bark more than others and have been bred to be vocal.
Dogs with anxiety bark with high-pitched vocals; this type of barking is generally rooted in separation anxiety, as are destructive behavior, pacing and depression. Attention-seeking barks are normally whiny and often sound like a child craving to be noticed. Boredom-based barks occur out of a place of loneliness or excess energy; some bored dogs bark just to hear their own voices. Compulsive barkers display the same type of behavior; other signs they exhibit include running in circles or along fencing.
A territorial dog barks when a person or another dog approaches its territory. If the intruder comes closer, the dog barks louder and becomes aggressive against the perceived threat. This form of barking can serve as a warning when a strange person or animal is approaching. Puppies and younger dogs bark too much when they are happy or greeting someone, and these barks usually have a friendly tone and a musical tinge. Immoderate barking can be remedied with measures such as training and spending time with the animal.