Dogs bark at nothing when they are bored, anxious, excited or seeking attention, according to About.com. They also bark to warn against potential threats and when marking their territory. Some breeds bark more often than others.
A loud or sharp bark means that a dog is barking at threats, which may be unseen. Dogs are observant and understand their environment well. When they whine, dogs are experiencing separation anxiety. Young dogs and puppies bark when playful. A musical bark means that a dog is happy and ready to go for a ride or walk. Sad, dull or annoying barks show that a dog is bored and needs a companion or some activity. Dogs can also bark to release excess energy. About.com adds that most dogs respond to other dogs by barking.
If possible, dog owners should remove the source of the behavior. Diverting a bored dog to constructive activities or using basic dog commands can stop unnecessary barking, and feeding and hugging may eliminate anxiety and boredom. It's best to avoid leaving a dog alone for too long. Dogs should be trained to prevent excessive barking in public places, according to About.com. Continuous barking may indicate that a dog is unwell and should be taken to a veterinarian. A trainer can also be used to prevent chronic barking.