The four-stroke diesel engine is similar to the four stroke gasoline engine. They both follow an operating cycle that consist of intake, compression, power, and exhaust strokes. They also share similar systems for intake and exhaust valves
Stroke 1. The downward moving piston sucks a mixture of air and petrol vapour into the cylinder through the inlet valve.
Stroke 2. The piston then moves upwards, compressing the gas mixture.
Just before the piston reaches the top of the cylinder a spark from the spark plug explodes the gas mixture. The pressure from the rapidly expanding gas pushes the piston down and causes a flywheel that it is connected to by the crankshaft to rotate. It is this rotation that is used to drive the wheels of the car.
The piston moves upwards in the cylinder again to push out the gases through the exhaust valve into the exhaust system of the vehicle. As the piston moves down, it pulls more fuel/air mixture in to begin the cycle again.