 Energy is added to the air by the combustion of fuel.Useful work is extracted by the expansion of the gas in the cylinder.After the expansion is completed in the cylinder, the remaining heat is extracted and finally the gas is exhausted to the environment.