If you read older literature, you'll see that a broken leg always seems to mean the horse has to be euthanized.
It's actually more complicated than that - but the answer ultimately depends on the level of medical technology (or magic) in your world.
Horses cannot survive lying down for extended periods of time. If a horse is down for more than a few hours, organ damage ensues (this is also, incidentally, even more true of elephants). Therefore, a horse cannot "stay off" a leg injury for the six to eight weeks it takes even a simple fracture to heal.
Minor breaks can be handled with a cast. Major breaks usually end in euthanasia, but with modern technology it's possible to save the animal. This usually means putting the horse in a sling that supports its weight and keeps it on its feet. (Slings are also sometimes used to save horses that are extremely emaciated).
Magical healing, of course, can change the situation entirely.
The short version for a writer: If you're writing in the real world prior to about the 1990s, then a broken leg is a death sentence for the horse. Hairline fractures or stress fractures might be survivable.
In the modern world? It depends on the value of the animal (harsh, but true). In a fantasy world, you can make whatever decision you want - and it may also depend on the value of the animal (how expensive is magical healing?)