There's nothing like the sound of our dogs adding their voices to sirens or the song of coyotes. Many people ask why their dogs howl.
Howling is complex, and the first part of the answer is partly a function of genetics. Some dog breeds howl more than others. Just as some dog breeds bark more than others.
The so-called 'primitive' breeds and northern breeds (malamutes, samoyeds, huskies, and the like) as well as hounds - dogs bred to 'give voice' when they found prey, such as dachshunds, Basset hounds, beagles, and the like.
Howling serves several functions for our dogs, the first is territorial. Dog relatives in the wild howl and by doing so, they warn off others from their territory. Coyotes 'read' the howling from nearby packs as clues to local population density. Fewer howling coyotes will trigger coyotes to produce larger litters.
Dogs are, of course, often territorial, and howling, no doubt serves the same purpose.
Dogs will howl along with coyotes and sirens, even singing, and while it is impossible to know why they do this, it would not be impossible to believe that just like members both within and outside of the pack trigger coyotes to sing, our dogs are triggered by the same instincts. They howl when they perceive someone else howling, whether that be a siren or coyotes (these would be outsiders) or they sing with us as we howl or play music.
Howling is also a distress call, and some dogs will choose to howl when they are left (as opposed to barking). Some of this could be genetic, with some breeds over represented. My border collie, Dice, howls like a maniac when one of my females is in season. The first time I heard it, I actually freaked out a bit, because the noise was so unworldly!
Some dogs will howl if they are injured, but this is uncommon.
Some dogs if they offer to howl in reaction to our howling at them, and if rewarded, they can be trained to 'sing' with us.
In my experience, while Australian cattle dogs, and Australian Shepherds can be barky, howling isn't super common. Only two of my dogs howls, both border collies.
Stopping your dog from howling is complicated by the many reasons that they choose to howl in the first place. As with any other behavior dogs exhibit, it's important to understand what the dog is seeking to do prior to beginning the process of extinguishing that behavior.