A thermocouple (not "thermocoupler") as used as a flame failure device (FFD) is an electrical device that uses the thermoelectric effect to generate a current at the junction of two dissimilar metals when there is a temperature difference between the junction and a colder junction at the other end . The bigger the difference in temperature the bigger the current will be.
The current can be used to power and electromagnetic gas shut off valve such that when a flame goes out as the thermocouple cools down the current drops below the strength needed to keep the spring loaded shut off valve open.
The current generated is not enough to open the valve by itself , it needs a manual action to open the FFD valve which is what happens when you press the gas valve stem in whilst trying to ignite the appliance.
There are other electronic means of detecting flames, ac rectification, DC ionisation bias, Resistance change, bi metalic thermal switches, but few are as foolproof and reliable as the Thermocouple FFD.