Step 6: Vacuum leaks
Gasoline and air must combine at a 1:14 ratio so it burns optimally. This is called the stoichiometric ratio and is defined by the chemical composition of gasoline. At less than the that ratio, gasoline either "explodes" causing engine knocking or does not burn at all. So, petrol engines have to run with a bias to rich, except for those engines where gasoline is injected directly in the cylinder (just like it happens with diesels) and the area around the plug has a stoichiometric ratio of gasoline to air and the rest of the cylinder has almost no petrol mixed with the air.
If the engine were to admit the same amount of air (if it had no throttle plate) at all times, it would have to be fed with enough petrol to raise the air to fuel mixture ratio to 14, it becomes obvious why the air intake is limited: so that the engine gets just a little bit of air with the right amount of petrol. When the engine is running slow but plenty of torque is necessary, the mixture is enriched. When it's running fast with the throttle wide open, the mixture is lean.
The throttle plate does that regulation. At idle, it is completely or almost completely closed. This generates a vacuum in the intake manifold. In a simple engine, like that of a lawnmower, the vacuum serves no purpose and is contained by the throttle plate. On a car, it does various tasks:
-powers the brake booster servo;
-guarantees positive cranckcase ventilation;
-sucks hydrocarbon vapours from the fuel tank;
-might regulate ignition advance and turbocharger
-powers miscellaneous devices such as wipers on antique cars.
For these tasks, vacuum has to be routed through hoses, gaskets, all sorts of devices. Obviously, gaskets, hoses and other items can and do fail. When that happens, the engine will run lean. If the car is fitted with a lambda probe, it will detect the excess air and warn the driver with the "check engine light". It will also try to adjust the system so it isn't running lean automatically. If there is no lambda probe and no automatic correction, the leak will manifest itself as a lean-running condition: idle speed will usually be faster or the car just dies if the leak is big enough. Between those two, the engine can develop a irregular idle.
One way of knowing if there is a large vacuum leak is removing the oil filler cap with the engine running. It should stop completely. If a vacuum gauge is available, it should be connected to the brake booster hose and ideally it will show a steady vacuum. If it doesn't, there is a leak.
Testing can be done in various ways: smoke testing is safe and effective but unless you have a smoke machine you can adapt to that use or build one, it won't be cost effective to buy a professional machine costing hundreds of euros. The other method is called hydrocarbon enrichment. It consists of using a unlit propane torch around a suspected leak. When the engine sucks the propane in, the idle goes a bit higher. Some people do it with carb cleaner but that's a lot more dangerous. Think safe.