well its either the magnetron or the transformer
, either one is expensive and dangerous to replace if this is a counter top model its not showing, its cheaper to replace than repair,
Consumer Product Safety Commission
Electrocution Hazard with Do-It-Yourself Repairs of Microwave Ovens
CPSC Document #5061
The U. S. Consumer Product Safety Commission (CPSC) warns against do-it-yourself repairs of microwave ovens. Each year, on average, four people die from electrocution trying to repair their microwave ovens. Microwave ovens use high voltage which makes it particularly hazardous for consumers to remove the cover and touch electrical parts. The possibility for electrical shock from a microwave oven still exists even after the oven is disconnected from the power source. Should certain internal devices fail, even unplugged ovens can cause serious injury.
The Commission strongly recommends that consumers have professionals repair microwave ovens because electrical appliances can be hazardous if consumers expose live electrical parts.
Removing the cover of your microwave oven and touching an electrical part can kill you.
Have a professional repair your microwave oven
this is the reason you shouldn't attempt repair yourself, thanks Bryan