How a Pilot Light Works
Most Pilot Lights consist of 3 parts. The Pilot Hood:
Note: many pilot assemblies look different but all function in the same way.
This is where the flame comes out, which will usually shoot out in 2 or 3 directions (notice in this example the pilot hood is bent so that the flame shoots out 3 directions). Once lit, one part of the flame will engulf the thermocouple sensor:
When heated, this sensor automatically creates a small amount of voltage (20-30 milivolts which is 1/500 of a volt). This small amount of electricity is sent to the main control valve (the same control valve that you use to light your pilot) and is just enough power to signal the valve to keep releasing gas to the pilot. This is why you keep the pilot knob held in when you first light the pilot but after 30 seconds or so, the pilot stays lit on its own.
If we look at the picture, on the opposite side of the pilot hood is another sensor called the thermopile:
Your pilot assembly may or may not have this. One way to tell this is that If your fireplace normally turns on from a wall switch or remote control, you will have a thermopile sensor. If you turn your fireplace on by reaching into the fireplace and turning a knob, you may not.
Basically, the thermopile sensor is the same as the thermocouple sensor, except its larger. And because it is larger, it creates a larger amount of electricity ( about 300-500 milivolts or 1/2 of a volt). Most of the time, this sensor only controls the main burner flame. But if you do not have a thermocouple, this will control the pilot flame as well.
Here is a short video that explains the thermocouple and thermopile: