To keep a successful aquarium, the aim is to establish a colony of beneficial bacteria within the filter which convert ammonia to nitrites and then into nitrates. These nitrates are then easily removed by water changes and absorbed by plants which is important because high levels of ammonia and nitrities within an aquarium are toxic to aquatic life.
The nitrogen cycle below shows how toxins are removed from an aquarium once a matured cycle has developed.