Air units are at the top of the tech tree and are typically very powerful in large numbers. "Massing air" is a common tactic, and a very dangerous one if you are caught unprepared. Through aggressive scouting and proper unit production (ground units with anti air capabilities, or even a fleet of your own), you should be able to achieve air superiority over your opponent. Also, be aware that some players hide their air unit production buildings in remote locations of the map; be very thorough in your scouting or you won't see them coming.
Air vs. Air Units
Some units are designed for air superiority:
These massive units are capable of withstanding gargantuan amounts of punishment, nigh unstoppable when upgraded and in large numbers. Perfect to break through base defenses, or to add another layer of firepower to your armies.
It's best to not to amass a single type of unit. Combine them with different types or add some ground units into the mix.
Terran: vikings + battlecruisers (add SCVs for repairs), raven for detection
Protoss: void rays + carriers, sometimes accompanied by phoenixes, add a mothership for cloaking, and an observer for detection
Zerg: corruptors + brood lords, sometimes accompanied by mutalisks, add an overseer for detection
Terran: vikings, marines with medivac support, Thors, missile turrets, raven using seeker missiles, battlecruisers
Protoss: high templars (feedback against units that use energy), psionic storm, photon cannons, phoenixes, void rays, massed stalkers with blink (combine with warp gates)
Zerg: massed mutalisks, corruptors, hydralisks, infestors (fungal growth, infested terrans)
Each race has an air unit that is capable of destroying structures quickly, or harassing the enemy. Race up the tech tree and try to surprise the enemy before they deploy any anti air defenses. To counter this, make sure you scout properly and build a few anti air defenses.
Cloaked terran banshees destroy a protoss nexus.
Void rays attack a terran refinery.
Stay on high ground
Different units have different attack range values. When fighting ground units, where applicable, use the range advantage and move over to high ground where the ground units can't reach, then bomb them from a distance. This works best with certain air units, like banshees, brood lords, or void rays.