A lot of organisms need oxygen to live on earth. Some oragisms are small enough to effect all the gas exchange through their cell membrane. Other organisms have an organ for gas exchange , some have tracheae as an organ others have gills or lungs. Most of these organs have invaginated (infolded or outfolded) areas, Gas exchange is only possible when the gases are in solution of a liquid (water). The organisms which live on land have to keep their gas exchange organs wet.
In the case of insects the gas exchange organ is not at one specific place in the body. The organ is a branched construction of tubes through the whole body. These tubes are called tracheae. The air is going straight towards every oart of the body. The air of the body enters the tracheae through the so called stigmata. The insect ventilates the air by making pumping movements with the hind part of its body. The end of every tracheae is filled with water to make the gas exchange possible. Some insects when they are still larvae have gills! Some waterinsects can take air with them in a kind of airbell under their cloaks or in their hair. The oxygen concentration drops in the airbell. The concentration of the oxygen in the airbell is lower than that of the surrounding water, oxygen moves into the airbell out of the water. Through this mechanism an insect can stay longer underwater one would think on account of the amount of oxygen there was in the airbell in the beginning.
Fish live underwater, that is not surprising. This is made possible because they have gills as organs for their gas exchange. Behind the head there are the opercula, which protect the gills and get rid of the water in the fish when necessary. The gills have such a finely subdivided surface that a few small gills may expose an immense total gas exchange surface to the water. These small gills are called lamellae, they are the actual sites of gas exchange. The water has to flow all day along to the gills to take up enough oxygen. The fish ventilates the water continuously along the gills by opening and closing the mouth. When a fish opens its mouth the water flows into the mouth. After that it will close its mouth and press the water along the gills, the operculum opens and the water leaves the fish. Some fish keep their mouths open all day and the water flows through the fish it passes along the lamellae. These lamellae contain a lot of arteries. The blood and water flow are countercurrents, moving in opposite directions. The oxygen moves out of the water into the blood of the fish.
According to the hypothesis, the swimmingbladder of modern fish evolved from a primitive ventral lung. The lung moved from ventral side towards the dorsal side. A swimmingbladder gives the fish its buoyancy. The swimmingbladder enables the fish to remain at a give level in the water, without sinking by adjusting the fish's overall density to that of the surrounding water. If the fish swims upwards, the swimmingbladder will swell in response to the reduced pressure and gases must be removed from it to restore the fish normal size. This is regulated by a gas gland in the walls of the swimmingbladder. The extra oxygen is going to the blood of the fish. Lungfish do not have a swimmingbladder, but as the name suggests they have a lung on the edorsal side. It is an invaginated (infolded) area and almost all of the oxygen is taken up by this lung. The gills are not so well developed and play a minor role in the oxygen supply.