An internal combustion engine (ICE) converts the chemical energy of fuel into mechanical energy through combustion inside a cylinder, with two main types: spark-ignition (gasoline) and compression-ignition (Diesel) engines. Its operation is described by thermodynamic cycles such as the Otto cycle (constant-volume heat addition), Diesel cycle (constant-pressure heat addition), and the mixed Sabathé cycle. While theoretical cycles assume ideal conditions, real cycles account for heat losses, friction, gas leaks, and variable properties, and are represented using P–V and P–θ diagrams. The engine operates through five main processes: intake, compression, combustion, expansion, and exhaust. Combustion differs between Diesel and gasoline engines in terms of ignition and flame development. Spark-ignition engines require an ignition system to generate high-voltage sparks. Engine performance is evaluated using indicated and effective parameters such as power, pressure, efficiency, and fuel consumption. Overall performance depends on various efficiencies (thermal, mechanical, volumetric) and is affected by losses including heat transfer, friction, incomplete combustion, and exhaust losses.