German engineer Rudolf Diesel invented the diesel engine in 1893. It was used extensively on ships for many years before it was adapted for use on land for trucks, trains, and other vehicles.
It differs from a petrol engine because it does not have an intake valve or spark plugs. Compression heating of air forces fuel into a combustion chamber with high pressure where ignition occurs spontaneously due to heat from compression of air caused by rapid piston motion; no valves are required because the engine’s operation relies on high pressure alone to compress the air/fuel mixture. Because there is no spark plug to ignite the mixture, there are no problems with preignition (sparking too soon). Thus, this type of engine can be operated at any time as long as there is sufficient air supply.