Easiest way:
Ammonia is a by-product of biological activities--fish living in the water, uneaten food breaking down, fish waste breaking down, etc. A group of bacteria consume the ammonia, and produce nitrites. Another group of bacteria consume nitrites, and produce nitrates. Ammonia and nitrites are very toxic to fish, so having a balance between the bacteria present and the waste produced is essential to healthy fish. More fish = more waste = need more bacteria, but bacteria can be slow to reproduce.
It's actually more complex, but that's the nutshell version. Try searching on Nitrogen cycle and you should get lots of hits, including pretty diagrams. (ammonia, nitrites and nitrates are all chemical compounds containing nitrogen).