How does a Windmill Produce Electricity?

A windmill produces electricity by capturing wind energy in its blades. As the blades spin they are connected to a shaft which is connected to a generator. As the shaft movies the generator turns the mechanical energy into wind energy.