Microwave ovens typically use a device called a magnetron to generate microwaves. The magnetron is a type of vacuum tube that converts electrical energy into high-frequency electromagnetic waves, specifically microwaves. The microwaves are then directed into the cooking cavity of the microwave oven, where they interact with the food, causing the water molecules within the food to vibrate and generate heat through a process called dielectric heating. This heat is what cooks or reheats the food in the microwave oven.