Diesel motors work by compressing just the air. The compression builds up the air temperature inside. When this happens the fuel converts to very fine particles and it lights suddenly. Diesel motors might be either two-stroke or four-stroke meaning that the piston travels around 2 or 4 times in one cycle while turning the crankshaft.
Just a little FYI.