The basic principle is Electromagnetic Induction.
Wind energy can be converted into electricity by windmills.
When wind rotates the wings of the windmill, it rotates a coil of conducting wire (mostly copper and such materials) placed in a permanent magnetic field. (SEE FIGURE ALSO)
The coil is rectangular in shape and is called an armature.
The coil is placed in the magnetic field such that two of its sides remain perpendicular to the magnetic field.
There is a small ring, known as Commutator, attached to the two ends of the rectangular coil. It rotates with the coil.
Two stationary brushes are in contact with the Commutator.
When the coil is rotated, there is a change in the magnetic field of the magnet. So, by the principle of Electromagnetic Induction as given by Michael Faraday, an electric current is generated in the coil.
The direction of this current can be known from Fleming's Right Hand Rule.
The current changes its direction in the coil twice during one rotation.
However, as one of the stationary brushes is always in contact with the side moving upwards and the other brush is always in contact with the side moving downwards, the direction of current remains the same outside the brushes.
Thus, Direct Current (DC) is generated.
This current is stored using appropriate method and in this way wind energy is converted into electrical energy.