Microwaves don't cook food with direct heat, rather they use high-frequency radio waves to warm foods much more quickly than a traditional oven could. Running a microwave with nothing inside can result in damage to the microwave due to the unique way it works.
Running on Empty is a Bad Idea
A microwave's magentron is its heart; it creates the electromagnetic radio waves, known as microwaves, that cook the food. Microwaves cause the water molecules within the foods you place inside the machine to vibrate and create heat throughout the food itself, cooking it. If there is nothing inside the microwave, or if the items in it don't contain any moisture, the microwaves can damage the machine. Without any water molecules available to absorb the waves that the microwave produces, they will be redirected back into the magnetron. The magnetron will begin to absorb as many microwaves as it produces, damaging the magentron.
No Magnetron, No Microwaves, No Dinner
Running a microwave with nothing inside for more than a few seconds will likely damage the magnetron. Without a working magnetron, your microwave won't heat your food properly, effectively ruining the machine. If you want to test out your microwave to make sure it's working correctly, always do so by putting a microwave-safe container of water inside before running it. Never use the microwave to heat dry foods, like crackers or dry cereal, because the lack of water molecules can result in magentron damage.