Learning about body language is very important when it comes to dogs. They have all kinds of ways of telling us not only when they are happy, comfortable and want to engage but also that they are uncomfortable, stressed, anxious, hesitant and want to be left alone. One thing we hear a lot after a dog has bitten is that he was "wagging his tail".
Wagging tails mean many different things. So how do you know if that tail is an invitation or a warning? A happy tail is usually loose and involves more than just the tail. The back end will move, the tail may go side to side or have a helicopter 'around and around' motion.
When a dog is using his tail to say "back off" there is a stiffness, the tail may only go to one side. The body doesn't move. Here's a good example from a recent case of a tail that is a warning. The sound is disabled for client privacy but the only movement you see other than the tail is when the dog barks. Even then you can see the stiffness in the body. So watch the tail. It only goes left, not passing the center line. It's stiff, not loose. The back end stays stiff. The dog is in a guarding position in front of the human.
It is very important that we teach body language, especially to kids. It's easy to misinterpret what the dog is trying to tell us and we need to be able to read the dog from tail to nose. If body language doesn't work the dog's behavior may escalate.