Diesel engines have higher compression ratios (typically around 22:1) than petrol engines (typically around 10:1). This means that the air and fuel mixture is compressed to a higher pressure in a diesel engine, which generates more heat.
In addition, diesel engines use a higher fuel injection pressure (typically around 2000 bar) than petrol engines (typically around 500 bar). This means that the fuel is injected into the engine at a higher pressure, which also generates more heat.