First, if stung on the hand, remove any rings from your fingers immediately.
If stung by a bee, the insect usually leaves a sac of venom and a stinger in your skin. Remove the stinger within 30 seconds to avoid receiving more venom. Gently scrape the sac and stinger out with a fingernail or a stiff-edged object like a credit card. Do not squeeze the sac or pull on the stinger -- this will cause the release of more venom into the skin.
Wash the stung area with soap and water and then apply an antiseptic.