Whether you realize it or not, microwave ovens were actually named for the microwaves that they emit to heat foods. Microwaves are located between radio waves and infrared radiation on the electromagnetic spectrum. Microwaves are found at a specific frequency on the spectrum (roughly 2,450 megahertz), and this allows them to cook the food but nothing else. These waves target the water molecules in the food, agitating them until they move around enough to produce heat (atomic energy).
So why don’t our bodies, which are about 60% water, cook when we stand too close to the microwave oven? The oven manufacturers actually use metal to line the walls of the microwave ovens to reflect the waves, keeping them inside the oven.
This video gives more info about microwaves and how they’re made and transmitted.