Microwaves normally emit a gentle hum during cooking as the motor turns the turntable and the magnetron cooks the food. The hum should stop at the end of the cooking cycle and stay off while the oven is idle.
Over-the-range microwave ovens often incorporate a fan that removes odors from the cooking surface below and vents air out of the microwave. The fan makes a humming noise when it is running; turn the fan off using the microwave controls to see if the noise stops. The fan automatically starts when the microwave is running or if the heat from the stove below reaches a certain temperature
The transformer that powers the microwave clock makes a gentle humming noise when the appliance is not in use. You should only be able to hear the transformer when the kitchen is quiet and you listen closely.
Disconnect the microwave's power to see if the humming noise continues. The sound might be coming from another appliance if the noise is still audible while the oven is switched off. Unplug and stop using the microwave if the noise persists once the power is reconnected.