First, never give in. If a kid is having a tantrum in a shop, say, because they want a sweet, then do not buy them a sweet.
Second, do not give them attention during the tantrum. Don't try to shush them, or try to put on a soothing voice or anything like that. Sometimes a tantrum is just for attention. I agree with @SuperSaints1877 - a distraction can bring it to an end quickly.
The key think that the kid needs to learn is that tantrums do not work. They don't get rewarded for acting this way.