The natural gas or propane is supplied by a pipe having its own gas shutoff valve. Just like you need to know where the water supply shutoff valve is located, you need to know where the gas line shutoff is located too. The gas line fees into a gas burner control module that serves as a kind of thermostat for the water heater. It also controls the ignition of the pilot light.
From the control module we now proceed to the gas burner assembly. This includes the pilot light and gas burner itself. The pilot light and burner adjustment are key to proper and energy efficient operation of the water heater. The gas flame should about 1/2 inch in height and should have blue tips.