The benefits to installing an over-the-range microwave oven is that it saves on shelf space while putting the microwave in a place where small children cannot easily get to it. When a microwave oven cooks, it releases hot air through vents found on the top or in the back of the unit. You need to vent this hot air, otherwise you are creating a fire hazard and your microwave oven will not work properly.
A microwave oven can be vented either by using ducts that move the air away from the microwave or by recirculating the air through a filter. According to the This Old House website, recirculating is not the most efficient way to vent an over-the-range microwave. The best venting solution is to use ducts to move the air away because it prevents moisture from building up and allows proper circulation that enhances the microwave's operation.
You will need to create a venting system that allows the air to be exhausted directly to the outside of the house. You can install a ventilation duct through the outside wall or out through the roof. Be sure to insulate the opening and put a layer of weatherproofing flashing around it to prevent water from getting in to your home. Over the range microwave installation kits come with a vent adapter that installs over the microwave exhaust area and can connect to your duct work.
Do not vent the microwave into an adjoining room or the attic. The air coming off of the microwave has moisture in it. If you vent into another room or into the attic, it will cause moisture damage to the wood and drywall in both areas. The moisture can also collect in an attic and start causing extensive water damage.
The installation instructions for your over-the-range microwave will tell you what size and shape of ducts you will need to properly vent the unit. You will need either cylindrical or box-shaped duct, depending on how the adapter in the microwave installation kit is configured. The manufacturer's instructions will offer suggestions on how best to set up your ventilating duct work, but you should create a layout that is most effective for your kitchen.