How can you convert energy into electricity? As in the propellers of a windmill being blown by the wind.
Most of the time through the use of magnets and a conductor like a coil of wire. As the wire turns through the magnet you produce electricity in the wire creating a generator. This works with water, wind, and heat that turns the coil of wire.
The rotating propellers will gear drive ar direct drive a generator. Water can also do the same thing such as in a dam. you can heat a thermocouple. There are numerous ways to excite the electrons of an atom. Try photovoltaic solar cells.
When current is passed through a coil placed in a magnetic field, it produces a force in the coil(actually a torque)...The reverse principal is used to produce electricity.
A coil placed in a magnetic field when rotated produces current...this is the working principal of generators...you can view the diagram in the link at the bottom...
In generators, a coil placed in a magnetic field is rotated..this creates current in the coil which is how we produce electricity...to rotate the coil we use many means like wind, water, thermal energy etc
Even in nuclear power plants the same principal is used...
Any "movement", can be used to turn an "electric generator" which is a combination of coiled copper wires & magnets,..
How a wind turbine works is the air passing by the blades create lift when the blades are pitched causing them to spin. this in turn spings a low speed drive shaft and then a high speed shaft before going into the generator to convert this mechanical energy into electrical energy (about 690 kV of electricity). The principals of the generator are explained by the other answers to your question.