A Windmill is a machine which converts the energy of wind into rotational energy by means of vanes called blades.
We know that a moving object can do work and also objects in motion possess kinetic energy. Blowing wind also posses energy which is used to move the blades.