A thermocouple measures temperature by utilizing the principle of Seebeck effect, which is the conversion of temperature differences into an electric voltage. It consists of two different metals joined at one end, creating a junction. When there is a temperature gradient along the length of the thermocouple, it generates a voltage that is proportional to the temperature difference between the two ends. This voltage is then measured by a device to determine the temperature at the hot end of the thermocouple.