Spend time playing with your dog. Pets often guard their food, their babies, and their toys. A dog's natural instinct is to chase after something that's running away. Instead, stand very still, let the dog sniff you, and continue to be still and quiet until the dog goes away. Instead, tell an adult about the animal.
Unneutered dogs are generally more aggressive and prone to bite.
A hug around a dog's neck seems like a nice thing to do, but to a dog this can be perceived as very threatening. Never put your face in a dog's face, thisis also considered as a threat. If a dog shows any signs of aggression towards you, tell the dog's owner, or report it to animal control. Unreported incidents increase the likelihood that this will happen again. This lets the dog know that you have not gotten its message, and it will probably get more aggressive if you continue to approach it.