The heat engine of any machine can convert heat into any work. Such as, a steam engine and car engine can be regarded as best example. Though real heat engines are said to be very complex and there are different ways through which heat energy can be converted into work. But, here you can get to know about the working of any heat engine in three parts:
In this case the heat energy gets created with help of some process that includes combustion of fuel and helps to offer heat energy.
This can convert the heat energy into work. In case of real heat engines, the conversion process can never be 100% efficient. The work output turns out to be less than any heat energy supplied.
The energy will not be able to turn into work and then moves to heat up the cold reservoir. The cold reservoir is said to be the atmosphere and can be assumed that temperature of cold reservoir will not increase as it contains infinite heat capacity.