Great question!

 If you pardon the pun, it all boils down to using the expansion of volume due to water being boiled, in order to produce mechanical work.

Although the earliest steam powered machine, the _aeolipile_, is sometimes called a steam engine, what is usually meant by a steam engine is specifically a mechanism where steam produced from boiling water pushes a reciprocating piston inside a cylinder. Once the piston has been pushed far enough into the cylinder, there is an opening that allows the steam to expand further, either into a condenser, further parts of the engine, such as another cylinder, or simply the atmosphere. The piston is connected to a crank via a connecting rod in such a way that the piston being pushed by the steam turns the crank, thus producing rotational motion. Many different kinds of steam engine designs exist, so it is difficult to describe the functioning of the steam engine beyond this, without going into describing a specific design, such as a _simple engine_, a _multiple expansion engine_, etc..

Theoretically however, the efficiency of all steam engine designs is limited by *the Rankine cycle*, which is an idealized 4 state thermodynamic cycle first described by William John Macquorn Rankine in the 1800's.

Other common features shared by all steam engines are the _heat source_, which produces the heat for boiling the water, the _boiler_, which holds the water that is being heated, the _motor unit_, with one or more pistons and other components, and the _cold sink_, which could be a dedicated condenser, or simply the outside environment of the steam engine.

Please feel free to ask further questions, if any of these things I've mentioned have piqued your interest!
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence