DIAGNOSIS That's typically the sound of the cooling fan motor struggling. It's located behind the rear panel and can get noisy if its bearings are worn or if it's hitting a wire or debris.
FIX Unplug the microwave. The fan is not user-serviceable from the front. The noise means it's still working, but failing. You can try vacuuming out the vent openings on the bottom and sides to ensure nothing is obstructing airflow, which can strain the motor.
IF THAT DIDN'T WORK If cleaning the vents doesn't quiet it down, the fan motor assembly itself needs to be replaced. This is a repair that involves taking the cabinet apart to access the high-voltage area, so it's a job for an appliance technician.
HEADS UP Don't ignore a loud fan noise. If that fan fails completely, the microwave will overheat and likely shut down or trip a thermal fuse, leading to a more expensive repair.