Function-of-magnetron-in-microwave-oven, 1940s: american engineer percy spencer accidentally discovers that microwaves produced by a magnetron have enough power to heat and cook food. he patents the microwave oven in the 1950s.. Magnetron from a microwave oven with magnet in its mounting box. the horizontal plates form a heat sink, cooled by airflow from a fan. the magnetic field is produced by two powerful ring magnets, the lower of which is just visible. almost all modern oven magnetrons are of similar layout and appearance., the microwave oven uses a magnetron to generate microwave energy. the microwave energy travels through a waveguide and is distributed into a metal cavity where the food is cooked. the waves are absorbed by the food and excite water molecules in the food. this heat then transfers throughout the food cooking it.