The most common heater found in a hot tub is the flow-thru heater type. Sometimes it is enough to replace just the heater element. Other times the entire heater assembly will need to be replaced. Flow through heaters are specified with voltage ratings (120V or 240V), kilowatt ratings (kw) and length, among other factors.
A heater can fail for several reasons. Preventative measures include good water chemistry, keeping the ph levels within the optimum range and cleaning the hot tub filter regularly; help increase the longevity of the heater.
Hot Tub Parts Source distributes a wide variety of spa heaters and elements including flow through heater manifolds with heater elements.