Dogs communicate with each other mainly through body language.
A dog can tell a lot by the position of the ears and tail, as well as by smell.
Although some vocalizations also play a role. Interestingly, the "dog language" of the body pets learn through training.
Causes of barking between dogs
Dogs can bark for a variety of reasons: asking for attention, wanting to feed or go for a walk. Sometimes dogs bark out of boredom, sometimes because they suffer from anxiety and fear.
When a dog barks at other dogs, it can be due to several reasons: he is scared, he is anxious, aggressive, or poorly socialized, so he is not used to other dogs.
Other than that, a dog's bark can be a greeting to a new friend they've just met, or a playful response to a barking dog they don't know.
Dogs also get to know each other through sniffing and remember each other. Humans remember facial features, and dogs remember smells, because each animal has its own unique scent glands. They use this scent to mark their territory.