Carbon dioxide (CO2) is a waste product produced by the metabolism and respiration of living organisms. It is also a vital nutrient for healthy plant growth
In the case of all animals, including fish, oxygen (O2) is used up and CO2 is released through respiration (breathing). In an aquarium the balance of oxygen and CO2 is maintained at the surface of the water where a 'gas exchange' takes place; excess CO2 is released into the atmosphere and oxygen enters the water to replace the oxygen used up.
Whilst all living organisms require oxygen and produce carbon dioxide, plants provide the other half of the equation by using up CO2 and producing oxygen through the process of photosynthesis. Whilst plants still produce CO2 as a waste product of respiration, they use up far more than they produce during photosynthesis.
Obtaining the correct balance of CO2 in the aquarium can become difficult when extensive use of plants are involved. In an aquarium with a few plants, a natural balance is usually established; the plants get enough CO2 from the fish and other organisms, and the overall production of CO2 never gets dangerously high. In aquariums where a significant number of plants are involved, the plants quickly use up the CO2 in the aquarium within the first few hours of the day (photosynthesis only occurs in daylight) and so they must be provided with additional CO2 if they are to thrive.
This is done by a number of dedicated CO2 producing systems, which create bubbles of CO2 that are sent into the aquarium and will diffuse into the aquarium water, ready for plants to utilize. During the day this is fine, but at night, when plants do not use up CO2, there may be an excess of CO2 in the aquarium. Because at night plants also produce CO2, this means that CO2 levels can become dangerously high, causing a lack of oxygen and difficulties for fishes breathing. In this type of situation it would be wise to either use a CO2 system which can be switched off a few hours before dark and turned on the following day, or to introduce additional surface movement at night (via the use of an air or water pump) to increase the gas exchange at the surface, ensuring that enough oxygen enters the water and allowing excess CO2 to escape.
A few fishes, including those from the labyrinth group of fishes (notably gouramies) are unaffected by low oxygen levels as they can take oxygen from atmospheric air.