Highly simplified diesel 4-stroke diesel engine cycling through the intake, compression, power and exhaust strokes.
1. INTAKE STROKE: the piston moves down and the air enters the cylinder. This is illustrated as a pale green cone of air that vanishes into the green inlet tube. Notice how the cylinder fills with this air.
2. COMPRESSION STROKE: the piston moves up and greatly compresses the air. Diesel fuel is injected at this point directly into the heated compressed air. This is illustrated as a rotating purple spiral at the top of the engine. The compressed mixture explodes.
3. POWER STROKE: this explosion drives the piston downwards in what is called the power stroke.
4. EXHAUST STROKE: the piston returns to the top of the cylinder in the exhaust stroke and drives the exhaust gases out of the engine. The exhaust gases can be seen leaving the (orange-yellow) exhaust tube as a cone of pale orange.
The reciprocating (back and forth) engine explodes the mixture (of diesel fuel + air) in a cylinder that forces the contained piston to move. This movement of the piston is transmitted (via the connecting rod) to a rotating device (crankshaft shown as a simple red disc) which is ultimately connected to the wheels (via gears, usually). The diesel engine is similar to the 4-stroke petrol engine but it uses the heat generated by the compression of air to ignite the explosion. To do this it compresses the air more than a petrol engine. The diesel engine therefore does not require a sparking plug. The diesel fuel (which is heavier and contains longer chain hydrocarbons) is injected directly into the cylinder when the air has been greatly heated by the compression stroke.