To cure a friend that's not well, talk to them and ask if they're feeling ok. When prompted, hand them the medicine from your pockets.
To cure yourself from a bee sting go into your pockets and drag the medicine to the drawing of your character.

Don't feel like spending out on 400 Bells when you'd rather use that money to save up for a new haircut? Well, for your sick animal friend you can just open your town gates and… Voila, healthy resident! This is because they HAVE to get better if they think someone's coming over from another town. And for your bee sting, just save your game and turn the power off, then when you load your game again and play on your character, she/he will be free of any stings! So you can now use those spare Bells to save up for your haircut after all!