The process of sweating mushrooms or other vegetables means making them release water and controlling the evaporation of that water to intensify flavor. When you are instructed by a recipe to "sweat" the mushrooms, you will begin at medium heat, usually sauteing to coat the mushrooms with oil. Then, turn the heat down and cover the pan, stirring occasionally.
You can also sprinkle a small amount of salt to season and encourage the mushrooms, onions or other vegetables to release their juice. If it appears that there is too much water in the pan, simply uncover and let the excess liquid evaporate. Properly sweated vegetables are floppy, but not swimming in liquid.
Step 1 - Add enough oil to coat the bottom of the pan.
Step 2 - Saute to coat with oil, then reduce heat and cover.
Step 3 - Cook until floppy but not floating in liquid.