This video provides a basic overview of the nitrogen cycle or "cycle of the tank".
Cycle: your fish produce ammonia. Beneficial bacteria live in you filter media (one reason why filtration is so important!). The bacteria take the ammonia and convert it into nitrite and nitrite into nitrate.
Please check out kokosgoldfish.com for more info on cycling and info on goldfish care : )