A stalled motor's cooling fan is not turning, at the same time its windings are dissipating lots of electrical power into heat. The heat ruins the insulation on the wire in the windings, and the windings then get short-circuited. This lets still more current flow through the motor, and the drive circuits themselves then fail due to excessive power dissipation in them.
This locked armature condition can be protected against by monitoring armature RPM as a function of drive power. High drive power + no RPM = locked armature which condition causes the driver circuit to fold back i.e., to reduce the drive power automatically to a value that is known to be survivable by a motor with no fan cooling.
It is also common to put thermistors on the drive circuit transistor heat sinks and on the inside of the motor casing, to generate a power shutdown command if either set of components gets too hot for any reason.
Alternatively, it is easy to implement a current sense circuit on the driver board which automatically limits the drive current to a level which will not overtemp the output transistors.
Note in this context that each of these error condition detectors is also used in audio amplifiers of modern design; in fact, you will almost always find at least two entirely independent power interrupt systems in audio amps to redundantly catch any error condition that could arise during operation. One important difference between the first generation of solid-state audio amps designed in the mid-1960's (which were notoriously prone to blowing up) and all later designs is the presence of more than one error condition detector circuit.