The pilot light burner is near the thermocouple. If the pilot light goes out or the electric igniter fails, it is a safety device that shuts off the gas. The pilot light should be adjusted or replaced if it doesn't stay lit.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.