Unlike their electromagnetic cousins the X rays, which are of much higher frequency and energy, microwaves can’t penetrate food more than an inch or so; their energy is completely absorbed and turned into heat within that region.
That’s one reason for the “cover and wait” injunction of recipes and “smart” ovens: It takes time for the outer heat to work its way into the food’s interior. In the absence of a bossy oven, a recipe will often tell you to stop and stir the food before continuing the heating. Same reason.
The heat distributes itself in two ways. First, the hottest molecules bounce against adjacent, less hot molecules in the food, transferring some of their motion, their heat, to them, so that the heat gradually works its way deeper into the food.
Second, much of the water has actually been turned into steam, which then diffuses through the food, giving up its heat along the way. That’s why most microwave heating is done in loosely covered containers; you want to keep that hot steam in, but you don’t want it to build up pressure and pop the lid.
Both of these heat-transfer processes are slow, so if the heat isn’t given enough time to distribute itself uniformly, you’ll wind up with hot and cold spots in the food.
Virtually all food contains water, so virtually all food can be heated by microwaves. (Don’t try to cook dried mushrooms, for example.) But the molecules of certain foods other than water, notably fats and sugars, are also heated by microwaves. That’s why bacon cooks so well in the microwave oven, and why the sweet raisins inside a microwave-heated raisin bran muffin can get dangerously, tongue-burning hot, even though the cake part is merely warm.
It therefore pays to be careful with fatty and sugary foods. Very hot water molecules can boil off as steam, but very hot fat and sugar molecules stay in place as unexpected hazards.
That’s another reason why it’s always wise to wait a while for the steam to calm down and the hot spots to even out before removing and eating microwaved food.