The flashpoint of a fuel is the lowest temperature at which it can form an ignitable vapour in air. At this temperature the vapour may cease to burn when the source of ignition is removed. A slightly higher temperature, the fire point, is defined at which the vapour continues to burn after being ignited. Neither of these parameters is related to the temperatures of the ignition source or of the burning fuel, which are much higher.
A commonly used device for measuring the flashpoint of liquid fuels is called the Pensky-Martens closed cup.
Gasoline (petrol) is designed for use in an engine which is driven by a spark. The fuel should be premixed with air within its flammable limits and heated above its flash point, then ignited by the spark plug. The fuel should not preignite in the hot engine. Therefore, gasoline is required to have a low flash point and a high autoignition temperature.
Diesel is designed for use in a high-compression engine. Air is compressed until it is heated above the autoignition temperature of diesel and then the fuel is injected as a high pressure spray, keeping the fuel-air mix within the flammable limits of diesel. There is no ignition source. Therefore, diesel is required to have a high flash point and a low autoignition temperature.