In a windmill, electric voltage is produced in the GENERATOR. A generator is a machine that produces a voltage by means of electromagnetic induction. This is done by rotating coils of wire through a magnetic field or by rotating a magnetic field or by rotating a magnetic field past coils of wire.
The wind serves as the energy that sustains this rotation at it drives the arms of the device to spin.