The thermocouple is the pilot's, well, co-pilot! It is the electronic device that senses if the pilot flame is hot enough to sustain burning the gas fuel from the burner of the fire. If the thermocouple thinks it's safe, then it keeps open the main gas valve located in the pilot assembly. If the thermocouple does not sense enough heat from the pilot flame (such as when the pilot is out), then the thermocouple shuts off the gas valve to the burners.
How the Thermocouple Works
So what is this thing and how does it work? Well the thermocouple (technically called a thermocouple junction) is a device that contains two metal wires welded at the ends and placed inside a protective metal case. The thermocouple sensor is found at the business end of the pilot flame and is designed to be placed in the hottest part of the flame. The other end is connected to the pilot valve body. As the thermocouple heats up, it produces a small amount of electricity and when it gets hot enough from the pilot, send a signal to open the gas valve by using a solenoid operated by a 24 volt transformer. The thermocouple calls the shots, and by converting heat to an electrical signal, it allows the gas valve to open or close.
Once the gas valve is open, gas is then constantly supplied to the pilot and as required for the gas burners (as called for by the thermostat). If the pilot goes out, then the thermocouple gets cold and produces no electric signal to open the gas valve's solenoid and the gas valve shuts off the gas supply to the pilot and burners. All very clever stuff!
Problems with Thermocouple
Thermocouple problems on Gas Fires