Well, if we look at the real-world mechanics of steam, it's basically a pressure exchange system. Steam fills a piston chamber, which pushes an attached arm to the piston, which in turn creates motion or "work". Then that pressure exits a valve, the piston returns to its previous position, and it starts all over again.