Michael Faraday's spinning copper disc started the age of generated power
Almost all electricity reaching homes comes from spinning machines that turn motion into current. The principle behind them was discovered by Michael Faraday in 1831 and 1832, and he built the first one himself: a copper disc turning between the arms of a horseshoe magnet, producing a feeble trickle of voltage.
Faraday found that a changing magnetic field passing through a loop of conductor pushes current around it, the rule now called Faraday's law of induction. His disc was inefficient, since current swirled backwards in parts of the copper outside the magnet's reach, and its single path through the field kept the voltage tiny. Winding wire into coils of many turns solved that, because output rises with the number of turns.
Every such machine pairs a spinning rotor with a stationary stator around it. One part makes the magnetic field, using either permanent magnets or electromagnets called field coils; the other carries the armature windings in which current is induced. Either can sit on the moving part. A coil turning in a field naturally produces current that reverses every half turn. Alternators deliver that alternating current directly, while dynamos use a switching device called a commutator to turn it into pulsing direct current, which many early uses demanded.
The Hungarian Ányos Jedlik had been experimenting with electromagnetic rotating devices since 1827, independently of Faraday. The earliest generator known to have served industry, built by Woolrich in 1844, powered commercial electroplating for the firm of Elkingtons and survives at the Thinktank science museum in Birmingham. The self-powered dynamo suited to heavy industry arrived from three inventors working separately. Samuel Alfred Varley filed a patent on 24 December 1866, and Werner von Siemens and Charles Wheatstone each presented theirs on 17 January 1867.
A generator is essentially an electric motor run backwards, and some motors will generate power if their shafts are turned. The word also stretches to solar panels and fuel cells, which make electricity without moving parts.
Source: Electric generator