There’s no open flame, no red-hot burner, no glowing oven coil. So how does a microwave invisibly cook your food? The answer: water.
Water is found in the tissues of all plants and animals. High-frequency electromagnetic waves produced by the microwave stimulate the water inside and heat the food.
The atoms in water molecules carry tiny electrical charges. The oxygen atom exhibits a partial negative charge and hydrogen atoms exhibit a partial positive charge. As the microwave bombards the food, it stimulates electrons. Water molecules continually attempt to reorient themselves so that their positive side faces the negatively charged electrons. This constant reorientation produces the rotation of the water. Rotation and agitation of the water molecules generates friction, which produces heat and warms your food.
To better understand, play with the single water molecule and electron here.