Sting most commonly refers to the wound inflicted by a bee or hornet, or to a kind of burning pain, like the brief sting when your doctor gives you a vaccine. A nasty remark can also sting.
"Float like a butterfly. Sting like a bee!" was Muhammad Ali's famous taunt to other fighters. But insects and boxers aren't the only ones who can sting. When someone says something that's both mean and true, it can sting. Such things are often referred to as stinging remarks. But if you're thinking crime, then a sting is a con-job that takes planning to pull off. When the cops spend months creating a fake crime-ring in order to catch criminals in the act, it's referred to a "sting operation."