Thermocouples are usually referred to as flame sensors in modern water heaters, although many water heaters have a standing pilot light that employs a thermocouple. In this situation, If the thermocouple is not functioning properly, the pilot light will not stay lit. It's conceivable that the thermocouple is unclean, misaligned, or damaged, but in many situations, it's better to just replace it rather than attempt to fix it. If you're comfortable working with gas equipment and making do-it-yourself repairs, this project may be a good fit for you. You can learn more about it here. However, many homeowners choose to pay a professional plumber to complete the task for them.