When I moved into my house, the previous owner had left a bee hive behind, until he could get back to move it. Long story short, the hive lived on my property for two years until the bees died one winter. I never got very much into beekeeping, but I thought about it, and occasionally I would open up the hive and check on them. I gained great fondness for bees even though I don't keep them.
One thing I learned is that the common tendency to call any stinging yellow insect a "bee" does a great disservice to the noble honeybee. Bees are not very aggressive at all to humans. If you're careful, you can open the hive right up and poke around without protective gear or a smoker. As long as you don't crush any of the bees, they'll pretty much stay perfectly placid.
Chances are excellent that if you have been stung by a "bee," it was probably a wasp. Unlike bees, which collect pollen, wasps are hunters, and defend their nests aggressively. They can sting multiple times without dying, and do so freely.
If you are interested, here is a post my girlfriend made on her blog about how to differentiate between the two.
The Difference Between Bees and Wasps | LoveLiveGrow
Even if you could give a darn about the semantics, the difference is important. As she points out, how to avoid being stung is exactly the opposite with bees vs. wasps. With bees, the number one thing you want to do is avoid agitating them or injuring any of them (which agitates them). So don't flail your arms around, don't run away. Just stay calm and move away from the hive and you will probably be fine. With wasps, they are
coming to get you, so you're better off clearing out as fast as possible.