The nitrogen cycle is the most important principle that you need to understand concerning an aquarium environment. In nature, the fish enjoy what is called an "open" type system due to, the very large water volume to fish ratio that they live in. This allows their water to be constantly renewed. In your aquarium, however, a "closed" type system exists where, without action on your part such as changing the water, their water will never be renewed and needs to be filtered properly for them to remain healthy.
Proper filtering consists of 3 types: mechanical, chemical, and biological. The most essential of the three is the biological filtering that is accomplished by the nitrogen cycle, and is described below.
The cycle begins when you add fish to the aquarium. Between excess uneaten decayed food and waste that is generated by these fish, toxic ammonia is formed.
These ammonia levels will increase for about 2 weeks until aerobic bacteria called nitrosomonas grow to sufficient quantities in the filter to convert the ammonia to toxic nitrite.
Nitrite destroys the hemoglobin in the fish's blood and eventually prevents the blood from carrying oxygen. As this happens, the ammonia levels will quickly begin to drop as the nitrite levels slowly increase. These nitrite levels will continue to increase for about 2 weeks until aerobic bacteria called nitrobacters grow to sufficient quantities in the filter to convert the nitrite to much less toxic nitrate. Again, as the nitrite levels quickly decrease, the nitrate levels will slowly increase. Once your tank has reached this point (about 5-6 week's total), it is said to have cycled.
Nitrate is harmless except in higher levels (such as above 40 ppm), which will promote algae growth in the tank. Even higher levels can result in stress that can weaken the immune system of the fish and make them susceptible to disease. All you need to do is to perform regular partial water changes in order to keep a moderately low nitrate level. If this practice is followed routinely, you should have no problems maintaining your biological filter.