In my mind, there are basically two ways to do things in life: you can do something well, or you can do it well and with panache.* Let's take World Cup soccer as an example: You can do something well, as in the technically flawless skills of Germany, or you can do it well and with panache, as in Brazil's way of not just playing the game, but playing it beautifully.
I'm going to assume that none of us aspire to doing things poorly, absent-mindedly, or half-assedly.
The key thing here is not that one way is objectively better than the other—on any given day, either of those teams has a chance of beating the other. They're just two different ways of approaching a task, one purely technical, the other with a little swagger and flair added in for good measure. (This is where I have to admit that I don't really follow soccer, and don't care to get into a debate with more knowledgable football fans about whether any of this is accurate or not.)
Learning to flip foods in a sauté pan is a similar matter. In most cases, it is not an essential cooking skill, since there is almost always an equally good, less flashy way to accomplish your task (like stirring, or using a spatula). And frankly, even in practiced hands, tossing food in a skillet runs the risk of making at least a small mess. It's like juggling—you can get very good at it, but that doesn't mean you'll never drop a ball.
Still, that doesn't mean the technique is without merit. First, it's an incredibly fast and efficient way to mix and move foods in the pan, with just a few quick tosses doing the equivalent of much more stirring. Second, in the case of wok cooking, it's partly responsible for wok hei, a hard-to-define flavor of, among other things, the vaporization of oils and liquids as they momentarily leap out of the wok into the intense heat of the burner.
But let's be honest: one big reason why we like to throw foods up, out of, and then back into a pan is because it looks kinda badass.
So, for those of you who want to master this only semi-essential skill, here's how you do it. For those who don't, feel no shame. You, too, can still be a good cook.
What to Toss
Before we get to the how-to, the first question is which foods to toss. Now, I know a lot of people like the idea of flipping pancakes, frittatas, and omelets in the frying pan. Such tosses, executed successfully, are pretty damn impressive. But I don't recommend it. First, it's way too easy to under- or over-rotate them, having them come crashing down on themselves in sad, broken heaps. Second, because each of these foods tends to be large relative to the size of the pan, they are much more likely to partially or completely miss their target on the way down (imagine doing flips on a giant trampoline; then imagine doing the same flips on a tiny one—which would you feel safer doing?). Third, even if you successfully rotate and land any of those foods, they're coming down hard on their wet sides, which far too often means a big old splattering belly flop.*
*Instead, I'd recommend carefully turning pancakes with a spatula; flipping frittatas onto an inverted plate, then sliding them back into the pan; and as for omelets, at least following classic French technique, they really shouldn't be flipped at all, but rather rolled up in the pan while still moist on top and then gently turned out onto the plate.
So what should you toss? Personally, I like to toss small mixed ingredients when stir-frying and sautéing to get them to quickly combine and move around the pan. I also like to toss foods like pasta in their sauce, and starchy dishes like risotto, though this can sometimes be a sloppier affair, so try that with caution (and an apron).
How to Toss
The first thing to know is that tossing should only be attempted in cookware with curved, sloping sides, such as frying pans and woks. The mechanics of food tossing is kind of like ski jumping, and ski jumpers race downhill towards a ramp, not a wall. In fact, let's use ski jumping as an analogy as we look at each step:
This is the starting position, with the food in the pan. Think of the food like the ski jumper before the jump.
The first thing the ski jumper has to do is race downhill towards the ramp. That's what you need to do with the food. But first, it's always a good idea to give the food a quick stir with a spoon, spatula, or tongs, just to make sure everything is sliding well in the pan and not stuck (sort of like when the skier slides back and forth a few times before committing to the launch). Once you're sure the food is free and clear to jump, give it a downward thrust towards the far slope of the pan.
Now our ski-jumping analogy ends, because if we were to stick with it, you'd let the food go shooting out of the pan and onto whatever's in front of you, and we don't want that. Instead, just as the food is beginning to launch out of the pan, you want to lift the front edge of the pan while pulling back ever so slightly, to redirect the food's trajectory so that it shoots up vertically, or—even better—backwards and slightly towards you.
With the food airborne and, we hope, above the pan, you next need to bring the pan slightly forward again to catch all the food as it comes down.
Execute it well and all of the food will end up right where it started and not on the floor. Note that once you get the hang of this motion, you can loop it so that the forward movement in this last step of catching the food simultaneously functions as the forward (and downward) movement of the next launch.
Here's a fun little gif to see all the steps together.