Fish Waste
Fish consume oxygen and food. The waste comes out in the form of carbon dioxide, which gradually decays to ammonia. Ammonia is harmful to fish at high levels and leads to the creation of nitrates, which are transformed by nitrobacteria into even more nitrates. Both the ammonia and the nitrates will kill the fish.
Too Many Fish and Too Much Food
In aquariums, ammonia mostly becomes a problem when the aquarium owner puts too many fish in the tank or puts too much food in the tank. Too many fish cause feces to build up, leading to too much ammonia. When there's too much food, fish do not consume it all and the food decomposes, releasing ammonia. Ammonia and phosphates are major products of the metabolic system of the freshwater ecosystem. Ammonia mostly results from dead organisms, decomposing food products and feces.
Bacteria
Nitrogen-fixing bacteria turn nitrogen into either nitrates or ammonia. Though some bacteria convert nitrogen into the dangerous ammonia, other bacteria break down ammonia and turn it into nitrates. These bacteria are everywhere and are likely already in the tank. Some companies also sell bacteria that aquarium owners can add to the tank if they want to make sure that they have sufficient bacteria.
pH Levels
Ammonia does not build up as much in freshwater tanks as in saltwater tanks because the pH in the freshwater tanks is at a different level and makes the ammonia nontoxic. In addition, there are more types of bacteria that grow in freshwater, which can remove ammonia from the water effectively.
Closed Systems
Normally, in open systems, such as the ocean, ammonia diffuses outward, reducing the concentration of ammonia in the water. However, in enclosed systems, like the aquarium, the ammonia can build up to a dangerous level. Ammonia is mostly lethal to delicate organisms when it reaches 0.1 ppm.
Poor Filtration
Aquarium owners can use activated charcoal filters to absorb ammonia. Activated charcoal filters are beneficial to aquariums in general, since carbon can absorb thousands of chemicals. Activated charcoal is a carbon with a slight electro-positive charge. Aquarium owners can also use biological filters that let bacterial colonies established themselves and break down ammonia.