I've read through the replies and many offer good suggestions. Of course, prevention is always the best policy. If you are confronted by an aggressive dog, be prepared to fight it off, contrary to what many have said there is such a thing as a bad dog . Some are not socialized by their owners and do not know how to deal with people or other dogs. Chained or tied dogs are good examples. In any case , when approached by an aggressive dog, you can behave like a submissive dog, by adopting the same body language:

1-do stand sideways (makes you look smaller)
2-do slump your shoulders (also protects your face)
3-do avert your eyes (make sure to see him in your peripheral vision)
4-do stand still or back away slowly
5-be familiar with but do not rely on the dogs body language - it is very difficult to detect subtle clues depending on coats, cropped ears / tails. This video is a good starting point - good for kids too : Learn to Speak Dog(speakers/sound not required)