A hub dynamo is a small electrical generator built into the front hub of a bicycle wheel that is usually used to power lights. Often the hub "dynamo" is not actually a dynamo, which creates DC, but a low-power magneto that creates AC. Most modern hub dynamos are regulated to 3 watts at 6 volts, although some will drive up to 6 watts at 12 volts.
A Schmidts Original Nabendynamo (SON) brand hub dynamo
Another SON dynamo
A Shimano dynamo hub
In electricity generation, a generator is a device that converts motion-based power or fuel-based power into electric power for use in an external circuit. Sources of mechanical energy include steam turbines, gas turbines, water turbines, internal combustion engines, wind turbines and even hand cranks. The first electromagnetic generator, the Faraday disk, was invented in 1831 by British scientist Michael Faraday. Generators provide nearly all the power for electrical grids.
U.S. NRC image of a modern steam turbine generator (STG).
Early Ganz Generator in Zwevegem, West Flanders, Belgium
The Faraday disk was the first electric generator. The horseshoe-shaped magnet (A) created a magnetic field through the disk (D). When the disk was turned, this induced an electric current radially outward from the center toward the rim. The current flowed out through the sliding spring contact m, through the external circuit, and back into the center of the disk through the axle.
Hippolyte Pixii's dynamo. The commutator is located on the shaft below the spinning magnet.