A gasoline engine compresses a mixture of gas and air and then ignites it with a spark. A valve lets gas into a combustion chamber, then closes to seal the gas in. The piston opens and closes the valve by moving up and down. When it moves upward, it compresses the mix of air and fuel in the chamber. A spark from the spark plug then ignites the mixture. This drives the piston downward, turning a crankshaft. As the fuel burns, exhaust is expelled through a separate exhaust valve. The piston then moves back upwards and the process repeats.
Diesel engines have been around almost as long as standard internal combustion engines, although they didn't come into wide use until the 1970s. A diesel engine follows the same basic cycle as a gasoline engine, and also uses the valve and piston combination to turn a crankshaft. However, it draws only air -- not an air and gas mixture -- into the combustion chamber. The air is compressed, and this causes it to heat up. Fuel is then injected directly into the combustion chamber. The heat of the compressed air lights the fuel, so there is no need for a spark plug.
The American Society of Mechanical Engineers reviewed the science in the TV portion of this report.