Microwave ovens cook foods by injecting them with, surprise, microwaves—a form of energy. These electromagnetic waves are invisible to the human eye and fall between radio waves, which are longer in wavelength, and infrared waves, which are shorter. Inside the guts of a microwave, a device called a magnetron channels electrical energy from a power outlet to a heated filament, creating a flow of electrons that in turn transmits microwaves into the cooking chamber through an antenna. Microwaves bounce around in the chamber and cook food through radiation heating—exciting molecules within an object—by becoming lodged in water, sugars, and fats. Because the microwaves can travel only so far into an object before losing momentum, the outsides of thicker foods become heated by microwaves, and the insides are heated subsequently by the conductive transfer of heat from the outsides.
So how do the common microwave rules make sense with these mechanics? Certain types of plastics are able to absorb microwaves like foods do, making them prone to melting, dissolving, and therefore contaminating the food cooked on or in them. Metal reflects microwaves and therefore interferes with the movement of the waves inside the ovens. And stirring food, at least that which can be stirred, helps to spread the heat, ensuring that the inside is cooked as well as the outside.