In a compression ignition (CI) engine, fuel is directly injected into the cylinder and spontaneously ignites when mixed with hot, compressed air. Combustion occurs in four stages: ignition delay, premixed combustion, mixing-controlled combustion, and late combustion. There are two main types of CI engines - direct injection engines which inject fuel directly into the chamber, and indirect injection engines which inject fuel into a prechamber before entering the main chamber. Factors like injection timing and quantity, intake conditions, and fuel properties can affect the ignition delay period.