Usually it’s the thermocouple, the small copper wire that connects to control valve and runs down to pilot flame. The small bulb that is in the flame is made of two dissimilar metals. When the pilot flame heats the thermocouple it makes millivolts of electricity. That tells control valve pilot flame is there before it turns gas on main burner.

Last edited by hanco; 02/13/20.