There are a number of reasons why dogs bark. Some breeds have a natural tendency to bark due to natural selection, such as Yorkshire Terriers, Shetland Sheepdogs, Newfoundlands, German Shepherds, Dachsunds, Beagles, Jack Russell Terriers, West Highland Terriers, Miniature Pinschers, Toy Poodles, Doberman Pinschers and Schnauzers. Dogs can bark when they are excited or aroused, such as when they are initiating or engaging in play behavior with humans or other dogs. Dogs who are bored or lonely will also bark due to stress. Dogs who are forced to live in the backyard 24 hours a day tend to be excessive barkers, both because they become very possessive of their territory, your yard, and because they are bored and lack mental stimulation.
Separation anxiety can often produce severe barking as well when the dog is left alone.
Finally, a dog who is pain due to a medical problem can bark to signal his or her distress and discomfort. Or you can draw your blinds or curtains in the windows facing toward the street so he cannot visually detect things that might stimulate barking. When your dog barks, ask him or her to sit, or down, or come to you, as they cannot bark and do any of these movements simultaneously with barking. You can teach your dog to bark on cue and then never give the cue again, thus extinguishing the behavior. Have practice sessions with your dog by inviting over guests to assist in you in training your dog.