Microwaves have an internal safety (typically ceramic body) fuse. The fuse can blow for several reasons:
1. Age
2. Door misalignment, or gunk in the door switch. (The oven incorporates various safety mechanisms to cause the fuse to blow and cut off power if the door is open when the magnetron is active. Normally, a separate switch or part of the switch signals the control circuit to stop before the safety switch causes the fuse to blow, but if things are not aligned or something interferes with the sequencing, they might not activate in the proper order.)
3. Faults (mostly shorts) in the magnetron or high-voltage power supply circuit.
4. Probably a bunch of other (less common) things.
Be very careful if you open up the microwave to check the fuse. The high voltage supply is entirely capable of producing a lethal shock; it operates at a few kilovolts and a substantial fraction of an amp. Electrically speaking, a microwave is the most dangerous common household appliance to work on. The high voltage capacitor in the circuit can store a very nasty charge even when the oven is unplugged. There generally is a bleeder resistor/circuit to discharge the capacitor; however, especially as the oven is malfunctioning, it's wise to not rely on that working. There are some good safety guides available online on safely and effectively troubleshooting microwave oven problems.