Wind can be used to generate electricity by turning blades which turn a shaft which turns a generator that produces electricity. Here's a simplified explanation of how it works.
When wind blows on the blades of a wind turbine, it spins the blades, the same way you can spin a pinwheel by blowing on it.
The blades are connected to a shaft. When the blades turn, the shaft turns.
The shaft inside the generator runs through a coil of wire. The coil is surrounded by magnets. When a coil of wire is rotated in a magnetic field, an electrical current is generated.
The current travels through a wire from the generator to an electrical inverter, then to the electrical grid.
The image below shows that the harder the wind blows (Wind Speed MPH) the more electricity is generated (Power kW). At a certain point, however, increased wind speed no longer increases power generation. The wind turbine is protecting itself from excessive wind speeds.