Ammonia is produced in large amounts by goldfish themselves. There are products available that control the level of ammonia in the water, however these are usually not reliable. They work well in the short-term by immediately decreasing ammonia levels, but they usually fail to keep ammonia concentration at a consistently low level over a longer period of time. The most effective way to keep ammonia levels low is by ensuring a healthy mixed bacterial population in the tank, again commercial bacterial inoculants are available to aid in this process. Another group of bacteria convert the nitrites to nitrates.
Nitrates are almost harmless and easily controlled by regular water changes.
The problem with ammonia is that it is highly toxic to goldfish, affecting almost all body systems and cumulating in death. Signs of ammonia poisoning include rapid breathing, fin congestion, blood spots on the body, and black fins. Ammonia problems can usually be avoided by maintaining good water quality, not overcrowding or overfeeding, and by providing proper filtration. Nitrites are also harmful to goldfish, but are less toxic than ammonia. Nitrites reduce the oxygen carrying capacity of the blood which can be fatal.