The thermocouple is the copper rod situated next to the pilot light. It controls a small valve that allows the gas supply to be stopped if the flame fails. All that gas can get into your home if the valve is left open.
This would cause an explosion if ignited, so the thermocouple acts like a lifeguard, keeping a watchful eye on things until something goes wrong.
If the thermocouple is broken, it will shut the valve even though the pilot light is functioning correctly, and you will be unable to open it manually, either.
In this case, a professional needs to replace the thermocouple, but don’t worry, they’re not expensive.