How does a stinger protect a animal?
A stinger is a defense mechanism for animals who have one. It helps protect them from being eaten or attacked by predators.
A bee's sting is its defence weapon. It was primarily evolved to protect the colony from other insects such as wasps which would try to rob the colony of their honey stores. As for the bright colours, in nature they usually warn potential predators that the animal is either dangerous in some way or tastes unpleasant.
No, a wasp cannot lose its stinger. However, honeybees do lose their stinger (and life) when they sting a person. And their stinger continues to pump venom into the victim after it has become detached from the bee. The stinger of the wasp is not barbed and can be used again and again, while the honeybee stinger is barbed and remains in victim's skin.