There are many components of your water heater that could lead to failure, including issues with the pilot light, heating element, thermostat, and more. It’s best to have a professional water heater repair contractor take a look to diagnose the real issue.