One of the most common is when the pilot light goes out. The pilot light is an electric spark that ignites the gas in the water heater to heat up water. If it goes out, then there will be no heat to make hot water available.
The second reason for a gas water heater not working is when you turn it on and there is no hot water coming out. This could be caused by an issue with the thermocouple or thermopile that regulates temperature in the tank or because of a leak in the pipes leading to and from your home’s hot-water tank (such as where they connect at your house).