It’s a cheffy term. Sweating means to cook the onion gently over a low heat, (usually in butter or oil or a mix of both.) sometimes with a lid, without changing colour, until softened, tender and just cooked.
How and for how long you cook your onion, will really affect the flavour of the recipe you are cooking. As you cook them more, the sweeter they become. The water in the onion evaporates, they release all their sweet juices that caramelise as they cook.
When a recipe asks you to cook a finely chopped or sliced onion for about 5-6 minutes, this will be just enough time to make it transparent and tender. (If, of course you cut larger pieces of onion, then this will take longer.)
To Sauté, means to brown quickly in oil or fat. Stir frying is like sautéing.
Confit is the term where you cook ingredients really, really slowly, ie. Confit of duck, potatoes or fish, usually cooked immersed in fat or oil. Onion Confit, is sliced or chopped onion, cooked really, really slowly, (between and an hour or two) in a small amount of fat or oil, on a low heat until melting and sticky. For Confit Potatoes……have a look here…..