An internal combustion engine is a type of heat engine that converts the chemical energy of a fuel, such as gasoline or diesel, into mechanical energy through the process of combustion. This mechanical energy is then used to power vehicles, generators, and various other machinery.