The first steam device was invented by Heron of Alexandria, a Greek, before 300BC, but never utilized as anything other than a toy. While designs had been created by varous people in the meanwhile, the first practical steam engine was patented by James Watt, a scotish inventor, in 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. 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.