The Newcomen steam engine removed water from mines. It worked but was extremely inefficient. Steam was not recycled (re-condensed) so the Newcomen engine required an enormous amount of coal to continually boil water. When used at a coal mine, where scrap coal was essentially free, this cost less than having workers remove water by the bucketful or mules walk in a circle turning a pump.
There were prior steam engines to the Newcomen engine, but none functioned well. Hero, of Alexandria, invented a device in the first century that heats water in the base of a closed device and, once boiling, steam propels the device in a circular motion. The device is little mentioned outside history and it appears too inefficient for any practical use. A commercial pump prior to Newcomen’s was Thomas Savery’s “Miners Friend,” patented 1698. Despite the name, the pump performed poorly and frequently exploded, injuring or killing miners. The Newcomen engine was stable, reliably and safely pumped water.
Newcomen was a Baptist pastor, not an engineer, and historians suggest his purpose in creating the pump was purely financial; he needed funds to maintain his church that struggled in Protestant England. Newcomen named his business Proprietors of the Invention for Raising Water by Fire.