We believe that some kinds of windmills were used in China and Japan 3.000 years ago, but the first well-documented windmill in the world was built in Persia around the 10th Century BC. Although it was very rudimentary (a mud cabin in order to increase the wind force on a side of the mat), it was enough to grind grain. However, it was in Europe where windmills had the most important improvements from the 12th Century with horizontal axis, cogwheels, and even sometimes the whole mill could be turned into the wind direction by using levels or oxen.
Those advantages let Medieval people to relieve the feudal oppression (wind was free instead watermills), and windmills were very popular along the countryside in Netherland, England, Germany, France, and of course, Spain. In addition, the wind wheel also has a very important role to colonize the prairies in America by pumping water to tanks in 18th and 19th centuries.