The theoretical upper limit on heat engine efficiency
A Carnot cycle consists of four reversible processes: two isothermal (constant temperature) and two adiabatic (no heat transfer). The engine absorbs heat from a hot reservoir at temperature Th, expands isothermally, then expands further adiabatically while cooling. It then compresses isothermally at Tc (the cold reservoir), rejecting heat, and compresses adiabatically back to the start. The beautiful result is that the Carnot efficiency depends only on reservoir temperatures: eta = 1 - Tc/Th. This means a heat engine operating between boiling water (100 C) and a cold sink (25 C) can never exceed about 20% efficiency, no matter how well designed. The Carnot cycle is the limiting case: real engines always perform worse because real processes are irreversible (friction, turbulence, finite temperature gradients drive heat transfer).
Reversibility and the second law
The Carnot cycle is reversible, meaning you can run it backward to create a heat pump or refrigerator, moving heat from cold to hot without violating any law. The second law of thermodynamics states that total entropy of an isolated system cannot decrease. A reversible process (Carnot) keeps entropy constant, while irreversible processes increase it. No real engine exceeds Carnot efficiency because that would require entropy to decrease, violating the second law. Modern power plants (coal, nuclear) achieve roughly 33-40% efficiency, well below Carnot limits, due to irreversibility and the practical constraint that the cold reservoir (atmosphere or cooling water) is much cooler than Carnot's formula would optimally demand.