Thermoelectricity, or electricity produced from heat, is called the Seebeck effect. It was discovered by German physicist Thomas J. Seebeck in the 1820s. The Seebeck effect occurs when two dissimilar conductors or semiconductors with different temperatures are joined in an electric circuit. In such a circuit, the larger the temperature difference, the larger the magnitude of the current.
In a metal, some electrons are not attached to a particular atom but rather move about freely, behaving like a gas. Each metal has a different density of these free electrons. Contact between two different metals causes the electron gases to diffuse into each other, causing the metals to become oppositely charged. This creates a potential difference between the metals, causing a current to flow between them.
Thermoelectric circuits which make use of the Seebeck effect are used in small thermoelectric generators, radio transmitters and receivers in space probes, thermocouples, or devices that don't require much electricity.
The reverse of the Seebeck effect is called the Peltier effect, named for Jean C. A. Peltier, a French physicist. Discovered in the 1830s, the Peltier effect occurs when a direct current flows through two dissimilar conductors or semiconductors. One junction heats and the other cools. This effect is used in some small heaters and refrigerators.