The diesel engine is an internal combustion engine that uses compression ignition, in which fuel ignites as it is injected into air in the combustion chamber that has been compressed to temperatures high enough to cause ignition. By contrast, petrol engines utilize the Otto cycle in which fuel and air are typically mixed before entering the combustion chamber and ignited by a spark plug, under which conditions compression ignition is undesirable. The engine operates using the Diesel cycle named after German engineer Rudolf Diesel, who invented it in 1892 based on the hot bulb engine and for which he received a patent on February 23, 1893. Diesel had earlier experimented with the use of coal dust as a fuel in a similar design of engine. At the bequest of the French Government the Otto company demonstrated it at the 1900 Exposition Universelle (World's Fair) using peanut oil ( biodiesel). The French government were looking at using peanut oil for a locally produced fuel in their African colonies. Diesel later extensively tested the use of plant oils in his engine and began to actively promote the use of these fuels..
Reference Link : https://en.wikipedia.org/wiki/Diesel_engine