Like the human lungs, fish gills filter dissolved oxygen for use in the body while releasing carbon dioxide.
Oxygen available to fish in the water is dissolved from the atmosphere. Fish do not break down the water molecules that breathe them. Since water is a solvent, it can dissolve other substances, especially gases. The moving water constantly mixes with the air to create bubbles (trapped gas) and dissolve the oxygen that the fish then use to breathe.
As a result, stagnant water will not replenish oxygen levels (or release accumulated carbon dioxide) unless disturbed.
A fish left in a bowl without filter, bubbler and frequent water changes will suffocate slowly and die a miserable death.
Similarly, eutrophication, too much organic waste, can cause hypoxia and inhibit life, even in a filtered tank. Too much organic waste causes algae growth, increased levels of ammonia, nitrite and nitrate in the water, all of which are fatal. An aquarium is a delicate system that requires certain measures to maintain a healthy environment and a happy fish. All tanks must be cycled (nitrogen cycle) to accumulate good bacteria, very similar to those of the intestine, able to fight against substances such as nitrites.