The thermocouple is an electo-mechanical safety device that senses if the pilot flame in an RV appliance is present. If the pilot flame goes out, the thermocouple will automatically shut off the flow of gas through the gas valve, thereby removing the fuel source and preventing the accumulation of explosive gas mixtures.
When the thermocouple is heated by the pilot flame, a small electrical current is generated. This micro current powers an electromagnet in the main appliance valve which holds open the valve that supplies the propane to the appliance.
If the pilot flame goes out, the electrical current is interrupted, the electromagnet is de-energized, and the valve closes automatically.
When lighting the pilot flame, allow the thermocouple to heat up for 30 seconds or so before releasing the valve button. If the pilot refuses to stay lit after several attempts, try gently cleaning the contacts where the thermocouple screws into the main valve body. When re-tightening this contact, screw it in finger tight, then tighten 1/4 turn with a wrench. If the pilot still will not stay lit then replace the thermocouple.
If you don't get any pilot flame at all or the flame is too weak to activate the thermocouple, your pilot orifice may be plugged, or partially plugged.