In microscopic organisms such as Amoeba, all of the oxygen needed by the organism, and the waste carbon dioxide produced, can be exchanged with the external environment by diffusion through the cell surface.
The amount of energy used in moving through the water means the oxygen demands of the muscle cells deep in the body will be high and they will produce lots of carbon dioxide.
Good blood supply ensures substances are constantly delivered to and removed from the exchange surface, maintaining a steep concentration gradient for diffusion.
Ventilation to maintain diffusion gradient is necessary for gases, a ventilation system also helps maintain concentration gradients and makes the process more efficient.
This adaptation ensures that steeper concentration gradients are maintained than if blood and water flowed in the same direction, known as a parallel system.
The human gaseous exchange system includes the nasal cavity, which has a large surface area with a good blood supply, which warms the air to body temperature.
In bony fish, gills are contained in a gill cavity and covered by a protective operculum, which is also active in maintaining a flow of water over the gills.
Gills have a large surface area for diffusion, a rich blood supply to maintain steep concentration gradients for diffusion, and thin layers so that diffusing substances have only short distances to travel.
The mouth is opened and the floor of the buccal cavity is lowered, increasing the volume of the buccal cavity and lowering the pressure there so water moves from the buccal cavity over the gills.