A klystron, magnetron or travelling-wave tube will generate microwaves. So will a vircator and an inductive output tube. These are just some of the vacuum tubes used to generate microwaves. In a microwave oven, the magnetron, which is a type of cavity resonator, is the device of choice.