Sounds like you have an electric heater. Usually when that problem happens it is caused by one of two problems. The lower heating element has stopped working due to age or sediment build up. This happens frequently in areas where the water is hard. The other reason is that the thermostat for the lower element is malfunctioning. Both require replacement.