Old Lady 1: I've been shopping!
Old Lady 2: What d'you buy?
Old Lady 1: A piston engine!
Old Lady 2: How d'you cook it?
Old Lady 1: You don't cook it.
Old Lady 2: You can't eat that raw!
--- Monty Python's Flying Circus, Episode 43
Actually, you can cook a piston engine. One stellar way is to lean out the mixture at high power and run it for several hours. You still can't eat it, but the company has to eat the substantial cost of replacing the cylinders. What a company pays a pilot in a year is a fraction of what the pilot can cost the company through poor engine handling.
In a piston machine, the pilot controls the ratio of vapourized fuel to air that is burned in the cylinders, using the mixture knob. It's usually red, an attention-getting colour that should underscore its importance. By sliding, twisting or pulling (aircraft manufacturers didn't get together on these things) the mixture control, the pilot decreases the flow of fuel to the engine. Pull it all the way out and there is no longer enough fuel flow to sustain combustion. That's the normal way to shut down a piston engine. The fuel actually has two purposes. One is to participate in the combustion reaction and the other is to provide cooling.
I could, and will later, write a whole post on combustion but essentially it's a recipe. Like a screwdriver: two ounces of vodka, six ounces of orange juice. You can slide that ratio a fair way in either direction. Excess orange juice serves to quench your thirst without getting you drunk, while excess vodka gets you drunk without filling your belly. An exceptional excess of vodka leaves you passed out on someone else's floor with one of your eyebrows shaved off.
The pilot's job is to adjust the mixture such that fuel is not wasted, but the engine does not overheat. At high power, that usually means full rich. The engine will burn a lot of fuel, producing a lot of heat, and the extra provides cooling through evaporation. That cooling is especially needed in the climb, when the forward speed and thus cooling (most piston engines are air cooled) is reduced. In cruise, the mixture can be reduced ("leaned out") so that the fuel flow more closely matches the available air, according to the altitude. This saves fuel and produces a smoother running engine. Before increasing the power, the pilot should increase the mixture. Lean the mixture too much or leave it lean while applying full power and you have a recipe for a cooked piston engine.
Turbine engines are even easier to cook, if the internal turbine temperature limits are not adhered to, but Monty Python doesn't have a sketch about them.