Air is mostly composed of nitrogen and oxygen gases. While humans and other land animals have lungs to extract oxygen from air, fish do not possess the necessary respiratory structures to extract oxygen from the air.
If a fish is exposed to air, it will quickly experience oxygen deprivation and respiratory distress. The lack of dissolved oxygen in the air causes the fish's gills to collapse and become ineffective in gas exchange. As a result, the fish suffocates and dies.