A windmill is a machine which converts the energy of wind into rotational energy by means of vanes called sails or blades.
The first practical windmills had sails that rotated in a horizontal plane, around a vertical axis.
Windmills were in widespread use across the Middle East and Central Asia, and later spread to China and India from there.
The total number of wind powered mills in Europe is estimated to have been around 200,000 at its peak, compared to some 500,000 waterwheels.
A windmill used to generate electricity is commonly called a wind turbine.