A turbo machine is a device in which energy transfer occurs between a flowing fluid and rotating element due to dynamic action.
This results in change of pressure and momentum of the fluid.
The overall principle is high pressure steam is forced over blades attached to a shaft, which turns a generator.
As the steam travels through the turbine, it passes through smaller blades causing the shaft to spin faster, creating more electricity.
Gas turbines - Gas turbines work much like steam turbines.
As per thermodynamic laws, the work is done by the fluid on the rotor of turbines, but the rotor does the work on the fluid of the pump or compressor using external prime movers.
In the rotor of the radial flow machine, the main direction of fluid flow is radial but in the axial flow machine, the fluid path is axial.