A very common variant of the internal combustion engine is the four stroke engine. These engines have four "strokes" for each combustion cycle. These engines are primarily used in automobiles but have recently found their way into motorcycles, boats, and even snow machines.
animation from keveney.com
The four "strokes" of these engines are as follows.
1. Intake: The intake valve (on the left top of the cylinder) opens allowing fresh oxygen rich air mixed with fuel to enter the cylinder.
2. Compression: The piston is pushed upward by the flywheel's momentum compressing the air/fuel mix.
3. Combustion: As the piston reaches the top of its stroke or TDC the spark plug fires igniting the mixture. Due to the high compression of this mixture (typically around 190 PSI in a typical engine) it is very volatile and it explodes when the spark is introduced. This pusehs the piston downward and produces power.
4. Exhaust: After the Air/Fuel mix has been burnt the remaining chemicals in the cylinder (water and CO2 for the most part) must be removed so that fresh air can be brought in. As the piston goes back up after combustion the exhaust valve (right top of cylinder) opens allowing the exhaust gasses to be expelled.
Ideally an engine takes in Air (Oxygen and Nitrogen) and fuel (hydrocarbons) and produecs CO2, H2O, and the N2 just passes straight through. The chemical equation is as follows.
2 C8H18 (gas) + 25 O2 = 16 CO2 + 18H2O
This equation is representative of a stoichiometric air fuel ratio (14.7:1). However under normal driving conditions an engine will encounter lean conditions when cruising on the highway (better milage) and rich conditions when accelerating (better power). The lean condition results in oxide and harmful nitrogen compound production. Rich conditions result in carbon monoxide production. For this reason a catalytic converter is used on most larger engines.
pre-cat material from a Saturn exhaust manifold
The catalyst material in a cat is in a wire mesh or honeycomb. This allows a high surface area to be exposed to the passing exhaust gasses. The catalyst (typically platinum) converts the harmfull nitrogen oxides and carbon monoxide into nitrogen, carbon dioxide, and oxygen. Catalytic converters work best when warm (as the reaction rate increases with temperature) so some car manufacturers are putting "pre cats" in the exhaust manifold to convert the gasses while the exhaust system is still warming up.