First you need to understand that because the grid is alternating current, and the generator and motor are wound in such a way, that the magnetic field inside the stator (the fixed housing) will rotate around at a speed determined by the frequency and the machine type. This rotating field can be made by the grid, or the rotor, a rotating (electro)magnet.
Wind turbines are an exception to this. Most generators are synchronous machines. Meaning that the magnetic field on the rotor, matches that present at the stator.
This applies to permanent magnet generators and most generators found on ships and in emergency power systems. Also rental diesels and most on site power plants.
Wind turbines use asynchronous generators. This means that the stator field rotation does not have to match the rotor rotation. This is similar to induction motors with slip.
When the wind is pushing, it will try to push the rotor beyond the speed of the alternating magnetic field on the stator. This generates energy.
When the wind is not pushing, the rotating stator field will try to take the rotor with it, making a fan. This obviously isn't the ideal case, hence some electronics prevent this.
The major disadvantage is that these cannot start easily from blackout, but they are cheap. Compared to DC-AC converting wind turbines.
I have skipped the process of synchronizing the generator to an active grid. But this basically means that you match the voltage, speed and phase so that there is 0 volt over the circuit breaker, thus no current will flow when turned on. After this, more mechanical power can be given to convert to electricity.
This is a danish wind company with some extra info.