Whenever we come across this instruction in a recipe, we can't help imagining little cartoon onions and carrots eying a soup pot with beads of sweat running down their faces. Fortunately, the reality is nothing so dramatic!
"Sweating" applies to the aromatic vegetable base of a recipe and simply means for you to start those veggies cooking before other ingredients are added. The goal is to soften the vegetables without browning them and let their flavors get a chance to start mingling.
Sweating is similar to sautéing in that it is usually done in a pan on the stovetop with a relatively small amount of oil. Unlike sautéing, you want to sweat vegetables over a medium heat and you don't want the vegetables to start browning. Look for the vegetables to start glistening and softening around the edges, then move on to the next step in the recipe.
This technique is often used in recipes where those aromatics will be a background flavor base rather than main ingredients in the dish. It's also used a lot in slow-simmered dishes where the vegetables will continue to cook over a long stretch of time, like with braises and soups.
Related: Technique: Making a Sauce Reduction