A gas thermocouple works by creating a small amount of electricity that is sufficient enough to keep open the part of the gas valve that lights the pilot assembly. It acts essentially as a sensor which is connected to the main control valve.
The thermocouple receives a small amount of heat from the pilot light, thereby creating about 20 to 30 millivolts or enough to keep the valve open for the pilot assembly. The thermocouple acts as a safety device which ensures that if the pilot light goes off, no gas will be released.
A thermophile is a group of thermocouples inside a metal housing. It produces 900 millivolts of electricity to open an electromagnet inside the main burner when the main switch is turned on.