Thermocouple
A safety sensor that shuts off the gas if a pilot light goes out.
In gas water heaters and older furnaces, the thermocouple is a small metal probe sitting in the pilot flame. As long as it senses heat, it keeps the gas valve open; if the pilot goes out, it cools and shuts the gas off so unburned gas can't fill the room. If your pilot won't stay lit, a worn thermocouple is the usual, inexpensive culprit.