Get our free book (in Spanish or English) on rainwater now - To Catch the Rain.
In the mechanical sense a piston is a cylinder that is capped with a lid or head that is moved by a difference in pressure inside the cylinder (chamber) that moves the lid a distance. This enables the input energy to do work. In most cases the input energy is heat via engines burning fossil fuels. But a piston can work using air or water as a means of creating a pressure difference. Work in this case is defined as work done by expanding the gases in the piston. In automobiles this is known as combustion. But it is simply adding energy (heat) to the substance in the piston to change its state from a liquid to a solid.
The energy added to a piston with water will change the state of the water increasing the volume inside the chamber of the piston. This is an isobaric process as the pressure will remain constant until the cap either hits stopper or the force on an attached crank to the top of the cap is greater than the force from the expanding gas in the piston chamber.