The principle we observe is: increasing temperature –>increases atomic molecular motion –> increases volume and changes water to stem –>increases pressure. Can we use this principle to build an engine? This is what occurred to inventors of the 1700s. The following site gives an animated illustration showing how a steam engine works. (Not shown is the boiler where a wood or coal fire heats water producing steam.) http://www.animatedengines.com/locomotive.html