In this slideshow, I’m sweating mirepoix, a classic combination of two parts onion, one part carrot, and one part celery. Mirepoix and its variants (parsnips instead of carrots, leeks instead of onions) form the basis of many braised dishes, soups, and sauces. Your recipe might also call for other aromatic vegetables like peppers, ginger, mushrooms, or fennel. Whatever vegetables you use, they should be cut into roughly the same size so they all sweat at about the same rate.
No one wants to sweat in a crowd
Using a pan that's big enough will help the veggies sweat, not steam. Don't use one too big, though—it'll be hard to keep the veggies from scorching. Heat the pan over medium-high heat. Add enough oil or butter to coat the vegetables lightly. When the oil is hot (you’ll see a bit of a shimmer, but no smoke), add the veggies. You should hear a gentle sizzle.
Salt helps release moisture from the vegetables
Add a generous pinch of salt and a few turns of pepper. Stir and lower heat to medium-low.
The vegetables gradually soften, shrink, and start to smell good
You can see the onions becoming translucent. Stir them to prevent browning but don't panic if a few pieces pick up a little color. (This is home cooking, after all.)
Some recommend covering the pan during sweating—the vegetables will soften a little quicker and retain more water this way. However, I like to sweat my veggies uncovered because 1) I usually want to get rid of that extra moisture and add in other, more flavorful liquids later on 2) I can control and monitor the sweating better 3) it smells so good.
Add garlic, herbs, spices
When the vegetables have softened up, it’s a good time to add minced garlic, herbs (such as thyme, rosemary, or sage), and/or ground spices.
No sweat, they’re done
After about five minutes, the vegetables have shrunk a bit and they are softened, but not mushy. Depending on the dish, your next step might be to add liquid and allow it to reduce. (If you browned meat in this pan earlier, you’ll want to deglaze first so you can incorporate that delicious food into the liquid.)