heat engine
A heat engine is any device that turns heat into useful mechanical work by letting heat flow from something hot to something cold and skimming off a share of that flow as work. Car engines, the steam turbines in power plants, and jet engines are all heat engines. The basic idea: nature lets heat run downhill from hot to cold on its own, and an engine puts a kind of water-wheel in that stream to capture some of the energy as it passes.
Every heat engine works in a repeating cycle between two temperatures. It draws in an amount of heat Q_h from a hot reservoir, converts part of it into work W, and dumps the leftover heat Q_c into a cold reservoir. Conservation of energy (the first law) over one full cycle, in which the engine returns to its starting state so ΔU = 0, gives W = Q_h - Q_c: the work out equals the heat in minus the heat thrown away. You never get to use all of Q_h — some must always be discarded to the cold side.
That last fact is not a mere engineering nuisance; it is a deep law. The second law of thermodynamics forbids any engine from turning heat entirely into work with no waste heat. This is why power plants have cooling towers and why engines get hot: the discarded heat Q_c is the unavoidable price of the deal, and it sets a hard ceiling on how efficient any engine can be.
An engine takes in Q_h = 1000 J of heat from burning fuel each cycle and exhausts Q_c = 700 J into the cooler air. The work it produces per cycle is W = Q_h - Q_c = 1000 - 700 = 300 J, so it converts 300 J of every 1000 J of heat into motion.
Work out equals heat in from the hot side minus heat dumped to the cold side.
A heat engine needs two temperatures, not just one hot source: with no cold reservoir to dump waste heat into, there is nowhere for the leftover energy to go and no work can be extracted.