The Nitrogen Cycle
To put it very basically, fish and other aquatic organisms excrete wastes into the water. One of these is ammonia, which is toxic to fish, as it interferes with their ability to extract oxygen from the water. However, in an established tank, there are legions of bacteria adhering to the gravel, decorations, the glass and especially the filter media. These bacteria subsist by converting the ammonia to nitrite. This by itself does the fish little good, as nitrite is also a toxin. However, another serendipitous group of bacteria, also ubiquitous in an established aquarium, then convert this nitrite to nitrate. Nitrate, though it can harm fish, is much more tolerable than the other two substances and can be kept to minimal levels through regular partial water changes.
In an aquarium that has just been set up, these obliging bacterial benefactors aren’t present, and so ammonia excreted by the fish can quickly build to harmful and even lethal levels. Eventually, a healthy number of the ammonia-eating bacteria will populate a tank, but this takes some time, from a couple to as many as several weeks. Once these bacteria have turned the ammonia into nitrite, the way is cleared for the ammonia-sensitive second group to colonize the aquarium and convert the nitrite to nitrate. This stage of the game takes time, as well, and during the transition, the fish are still vulnerable to the effects of the nitrite. Only when all detectable ammonia and nitrite have been transformed into nitrate can the fish live comfortably. This is why so many would-be aquarists fail: These toxins can exist at high levels without any visible effect on the water. In other words, an apparently pristine aquarium can in fact be a crystal clear chemical death trap.