A thermocouple generates an electrical signal based on temperature differences through the phenomenon called the Seebeck effect. When two different metals are joined together at their ends, a voltage is created at the junction due to the temperature difference between the two ends. This voltage is proportional to the temperature difference and can be measured to determine the temperature. This is how a thermocouple converts temperature differences into electrical signals.