After being compressed and heated, diesel fuel is injected, and the resulting mixture is ignited by compression heat.
The main difference is that only clean air is drawn into the cylinders. The principle of operation of a four-stroke diesel engine is very similar to the operation of a four-stroke petrol engine. Animated scheme of a four stroke internal combustion engine, Otto principle by Zephyris, license: Creative Commons CC BY-SA 3.