If it’s an electric water heater usually a short or ground within the chassis wiring (wiring inside the unit) will cause a breaker to trip. Sometimes one of the two heating elements will go bad. However, it’s rare (from my experience) for a faulty heating element to cause a breaker to trip since the bad element usually opens the current to the heater. The latter scenerio is still possible though, and sometimes a heating element can ground out.
It’s possible that the breaker itself could be bad, though this is uncommon it does occur. The age of a home can also be a factor, so you may want to make sure you have a thirty amp breaker, and make sure that the wiring that powers the water heater is at least a #10. Sometimes electrical ‘hobbyists’, or weekend warriors who overrate their electrical skills take shortcuts when they do things themselves, and many times they’re not competent.
You could try pulling out the top heater first and disconnecting one of the wires to ensure that the problem isn’t coming from there. You would want to drain the water first, which is why I recommended testing the top element first. There’s a drain nut/plug on the bottom of the tank to get the water level low enough to pull out the top element. I have too little info here, and I can think of several things which could be causing this, and I really don’t want to try to walk a nontechnical person through this for safety and other reasons.
My advice for you (assuming you’re not mechanically inclined) would be to look for the obvious, like a bad wire, leak, or what I’d mentioned above checking the breaker rating. I’d wait for help from someone who’s qualified or smart enough to troubleshoot the problem for you.