A steam engine is a heat engine that makes use of the potential energy that exists as pressure in steam, converting it to mechanical work. Steam engines were used in pumps, locomotive trains and steam ships, and were essential to the Industrial Revolution. They are still used for electrical power generation.
A steam engine needs a boiler to boil water to produce steam under pressure. Any heat source can be used, but the most common is a wood or coal fire. The steam is allowed to expand by pushing against a piston or turbine, whose motion is used to do work.
Steam engines are less favored for automobiles, which are generally powered by internal combustion engines, because steam requires thirty seconds (in a flash boiler) or so to develop pressure.
The first steam device, the aeolipile, was invented by Heron of Alexandria, a Greek, in the 1st century AD, but used only as a toy. Denis Papin, a French physicist, built a working model of a steam engine after observing steam escaping from his pressure cooker in about 1679. Early industrial steam engines were invented by Thomas Savery (1698), Thomas Newcomen (1712), and James Watt (1769). Steam engines are of various types but most are reciprocal piston or turbine devices.
The strength of the steam engine for modern purposes is in its ability to convert raw heat into mechanical work. Unlike the internal combustion engine, the steam engine is not particular about the source of heat.
A steam engine exhausting to atmosphere will have an efficiency (including the boiler) of 5% but with the addition of a condenser the efficiency is greatly improved to 25% or better. A power station with exhaust reheat, etc. will achieve 30% efficiency.
One source of inefficiency is that the condenser causes losses by being somewhat hotter than the outside world. Thus any closed-cycle engine will always be somewhat less efficient than any open-cycle engine, because of condenser losses.
Most notably, without the use of a steam engine nuclear energy could not be harnessed for useful work, as a nuclear reactor does not directly generate either mechanical work or electrical energy - the reactor itself does nothing but sit there and get hot. It is the steam engine which converts that heat into useful work.