Sweating is just gently cooking vegetables in oil, so they become sweet and fragrant. The best way to do this is with gentle heat (4 out of 10 if that’s how your hob works) with a sprinkle of salt and a lid. The salt draws out some juice and the lid traps steam, so it partly cooks in the oil, partly stews in its own juice and partly steams in the closed pot.