Microwaves are generally reflected by metal surfaces. Therefore, the cooking chamber is an enclosure made of metal, except for the oven door. Even then, the glass paneled oven door has a metal mesh to keep the microwaves in.
As such, the microwaves keep bouncing off the walls of the cooking chamber and are continually passed through the food. These waves are absorbed by the food, particularly the water molecules found in most foods.These water molecules are excited by the microwaves and they bump around, creating friction that produces heat. This, in turn, heats up the rest of the molecules of the food, effectively heating or even cooking the food.
Ceramic and glass containers are water-free and thus remain cool, although hot food might heat them through conduction.
For additional information: