A windmill is a machine that is powered by the energy of the wind. It is designed to convert the energy of the wind into more useful forms using rotating blades or sails. The term also refers to the structure it is commonly built on. In much of Europe, windmills served originally to grind grain, though later applications included pumping water and, more recently, generation of electricity. Recent electricity-generating versions are referred to as wind turbines.