Oh, boy, this is complex. Here's the simplified version:
We address people not only based on their age but our age as well.
If we're about the same age, then call them bạn = friend.
If they're younger, call them em. Here's a trick. If you think the lady is older than you, but only by 5-10 years, call her em anyway to make she feels young :-)
if they're older, then anh = male, chị/cô = female.
If they're older than your dad, call them bác.
There are more, but I think these four general rules should be enough to keep you safe.