A microwave oven works by using electromagnetic waves, known as microwaves, to heat food. These microwaves are produced by an electronic vacuum tube called a magnetron. When the microwave oven is turned on, the magnetron generates these microwaves, which are then directed into the oven cavity. The microwaves bounce off the reflective metal walls of the oven and pass through the food, causing water molecules in the food to vibrate rapidly. This rapid vibration generates heat, which cooks the food from the inside out.
When you set the cooking time and power level on a microwave oven, you are essentially controlling how long the magnetron emits microwaves and at what intensity. Lower power levels mean the magnetron cycles on and off more frequently, resulting in reduced cooking power during the cooking time you've set.
As for energy consumption when the microwave oven is turned "off," most modern microwave ovens have a standby mode or clock display that consumes a small amount of power even when not in active use. This standby power usage is typically very low, often just a few watts. It is used to maintain the internal clock and other functions that allow the microwave to respond quickly when you want to use it.
To further reduce energy consumption when the microwave is not in use, you can unplug the appliance or connect it to a power strip and switch off the power strip when the microwave is not needed. This way, you can prevent any standby power consumption and ensure that the microwave is not drawing any energy when it's not in use.