In a gasoline engine, fuel is mixed with air, compressed by pistons and ignited by sparks from spark plugs.
In a diesel engine, however, the air is compressed first, and then the fuel is injected. Because air heats up when it's compressed, the fuel ignites
the diesel engine has no spark plug, that it intakes air and compresses it, and that it then injects the fuel directly into the combustion chamber (direct injection). It is the heat of the compressed air that lights the fuel in a diesel engine
Some diesel engines contain a glow plug. When a diesel engine is cold, the compression process may not raise the air to a high enough temperature to ignite the fuel. The glow plug is an electrically heated wire (think of the hot wires you see in a toaster) that heats the combustion chambers and raises the air temperature when the engine is cold so that the engine can start
If you have ever compared diesel fuel and gasoline, you know that they are different. They certainly smell different. Diesel fuel is heavier and oilier. It evaporates much more slowly than gasoline -- its boiling point is actually higher than the boiling point of water. You will often hear diesel fuel referred to as "diesel oil" because it's so oily.
Diesel fuel evaporates more slowly because it is heavier