If you get right down on their level and speak really soft (almost whisper) it helps. It's better than shouting at them. Some parents obviously think it's good to yell, in fact it's just another person annoying the caca out of you.
My daughter had a couple of good tantrums in the grocery store. I guess she wanted a toy or something. The first time I was so horrified that I just kept shopping. She was in the cart. She wasn't running through the store knocking things off shelves, but she was being annoying. The next time the very second it started I told her quietly that if she continued we would leave, and that's what we did, with no food. It took a couple times of that and she was great in stores.
She never never never would have hit me or anyone else though, I never would have tolerated that.
Consistency and not giving in is the best advise a parent with a toddler can hear.