Nicolaus Otto (Holzhausen, Germany) invented the first practical alternative to the steam engine in 1876 -- the first four-stroke internal combustion engine. He called it the "Otto Cycle Engine," and as soon as he had completed his engine, he built it into a motorcycle. On October 23, 1877, patent for a gas-motor engine was issued to Nicolaus Otto, and Francis and William Crossley.
Rudolf Diesel born in Paris to German parents grew up in London, Paris and Munich patented the diesel engine in 1892 in Germany. The concept of using vegetal oil as an engine fuel likely dates when Rudolf Diesel (1858-1913) developed the first engine to run on peanut oil, as he demonstrated at the World Exhibition in Paris in 1900.
The new generation gasoline and diesel engines are highly efficient and offer fuel economy.
Gasoline engine and Diesel engine currently use what is called a four-stroke combustion cycle to convert gasoline/diesel into motion. The four strokes are Intake Stroke ,Compression Stroke,Combustion Stroke and Exhaust Stroke.
In a gasoline engine the strokes are as under:
Intake Stroke: The piston starts at the top, the intake valve opens, and the piston moves down to let the engine take in a cylinder-full of air and gasoline.
Compression Stroke: Then the piston moves back up to compress this fuel/air mixture.Compression makes the explosion more powerful.
Combustion Stroke: When the piston reaches the top of its stroke, the spark plug emits a spark to ignite the gasoline. The gasoline charge in the cylinder explodes, driving the piston down.
Exhaust Stroke: Once the piston hits the bottom of its stroke, the exhaust valve opens and the exhaust gas / smoke leaves the cylinder to go out the tailpipe.
In a diesel engine, there is no spark plug. Instead, diesel fuel is injected into the cylinder, and the heat and pressure of the compression stroke cause the fuel to ignite. Diesel fuel has a higher energy density than gasoline, so a diesel engine gets better mileage.