A thermocouple is a device consisting of two different conductors (usually metal alloys) that produce a voltage
Voltage, otherwise known as electrical potential difference or electric tension is the difference in electric potential between two points — or the difference in electric potential energy per unit charge between two points...

 proportional to a temperature
Temperature is a physical property of matter that quantitatively expresses the common notions of hot and cold. Objects of low temperature are cold, while various degrees of higher temperatures are referred to as warm or hot...

 difference between either end of the pair of conductors. Thermocouples are a widely used type of temperature sensor for measurement and control and can also be used to convert a heat gradient into electricity.