Microwaves contain elements that are hazardous — similar to computer monitors — and should be carefully disposed of. If you are simply replacing a working unit, you may want to donate the old microwave to a thrift store or a local charity, or post the item on an online trading/sales site.
Broken microwaves can be repaired at a low cost. Check with a local appliance repair shop to see if they can fix the unit or know of a recycling resource. Many appliance recyclers will disassemble microwaves and reuse the salvageable parts while properly disposing of the remaining items.