A reciprocating steam engine consists of a cylinder in which a piston is fitted inside. Steam drives the piston up and down or back and forth to generate mechanical energy. Early models used steam to displace air from a cylinder and then water would be used to condense the steam, pulling the cylinder back. Then came the separate condenser, which allowed the engine to stay hot while keeping the cooling steam in another chamber.
A very popular form was the double-acting steam engine. A valve controls the intake of steam. There are two openings from which the steam can enter, on two sides of the piston. The valve moves with the piston, only allowing steam to enter in through one opening. Thus, steam pushes the piston down and is then directed into to the opposite side of the piston and pushes it back up. A high-pressure steam engine uses extremely high pressure steam to push the cylinder, without condensation.
Later, compound engines which use multiple cylinders instead of wasting energy that used steam still has made an important contribution to ship development (See Powered Ships). Today, the reciprocating engine has been replaced by the turbine.