An electric heater has no flame to read, so the diagnosis comes from two things: how much hot water is missing, and whether power is reaching the unit.
Reading the symptom
Completely cold. Both elements or the supply are out. Check the breaker first — a tripped breaker that resets and stays on points at the heater; one that trips again points at a fault inside it.
Lukewarm, or hot water that runs out fast. One of the two elements has usually failed. Most units have an upper and a lower element, and losing either leaves the tank half-heated rather than cold.
Hot at first, then cold. Often the upper element or its thermostat, or a dip tube that has cracked and is letting cold water into the hot draw.
Noisy while heating. Sediment on the element and the tank floor, which is the same hard-water problem a gas tank gets.
What is checked, and what is replaced
Elements, thermostats, and the reset switches are replaceable parts. Wiring and connections are checked for heat damage. The tank is not repairable: water from the shell means the unit is finished, and no element change will fix it.
Two practical notes. Elements can be tested without draining the whole tank on many units, but on older tanks the risk of disturbing a corroded fitting is real, and that is a judgement made on site. And a breaker that keeps tripping is doing its job — it should not be uprated to stop it.
Repair or replace
Same rule as any tank: a failed part on a sound tank is a repair. A leaking shell, or an old unit that has now failed twice, is where replacing starts to be the cheaper answer over a few years. A unit that is cold rather than leaking is worked through, symptom by symptom, in why a water heater stopped heating.