Denis Papin (1647-1712) constructed the first steam-power engine.
James Watt (1736-1819) succeded in improving the steam engine to an effective, reliable and economic power source.
In the boiler steam of high-pressure is generated in the fire tubes. It is led through the steam intake into the slide-box and by the slide into the zylinder at one side of the piston.
There the steam is expanding and pushing against the piston. By the connecting rod the flywheel is turned half a rotation.
Now the slide is moved and the supply is at the other side of the piston. By that the piston is pushed back, the flywheel is turned again half a rotation and at the same time the expanded and cooled steam can escapes through the steam-exit to the funnel.