Microwaves can channel heat energy directly to molecules inside food. It heats it by radiation. The generator, known as the magnetron, takes electricity and converts it into high-powered radio waves. The food sits on the turntable, where the food is cooked. There are vibrating molecules that make the food hot, and heats it up quite rapidly.
Here is a video to better explain the process:
Here is a video to better explain the process: