Basically when you add water to anything it is a fairly sterile environment (new). As soon as you start adding living things like plants, fish, snails, etc, they start adding waste to the environment.
Just about everything in a tank produces ammonia. Fish urine, fish waste, decaying plant matter, excess fish food rotting in the tank or filter cartridge, and even if you don't feed them the fish still breath and ammonia is one of the products that their breathing releases into the environment. Ammonia is at best stressful to fish causing them to weaken and become more likely to come down with diseases. At higher levels it can kill them outright. A tank full of ammonia is similar to walking into a chicken house. If you've ever been in one then you know what the burning watery eyes and difficulty breathing must be like to a fish. After some ammonia is in the water bacteria will start to grow on all surfaces of the tank. Glass, decorations, gravel, inside filters, etc. The bacteria basically eat the ammonia and convert it into nitrite.
Nitrite is also toxic to fish. It interferes with the fish's ability to get oxygen from the water. In other words it can lead to weakening or suffocation. The addition of salt can help during this period. It temporarily relieves the symptoms of nitrite poisoning while corrective actions are taken. More bacteria (nitrospira) will then begin to grow and convert the nitrite into nitrate. Nitrate in freshwater is pretty harmless in smaller quantities. It serves as food for plants and algae.
Cycling in general refers to the amount of time it takes sufficient quantities of bacteria to grow so that all ammonia being produced is instantly converted to nitrite and then nitrate. Ammonia will still be produced almost 24 hours a day. It just will not have time to accumulate in quantities that our test kits will show or to levels dangerous to the fish. The first month in freshwater is usually the only time it becomes a problem. In most cases your tank will cycle in 30 days.
The trick is to maintain lower levels if fish are already in the tank. Limiting the amount of food added so that it doesn't build up excessively and changing part of the water at least once a week best do this. Vacuuming the gravel at the same time removes much of the solid debris before it breaks down and the water change dilutes the amount in the water. I also recommend rinsing the filter bags to remove the waste from them as well. Even though its in the filter its still in contact with the water and will continue to produce ammonia.
Moving beyond the simple stuff there are a few other things to consider. If your water is acidic (less than PH 7.0) then ammonia becomes less toxic. The higher the PH the more deadly ammonia becomes. That's why salt tanks at 8.2 are more lethal to fish than freshwater at 7.0. Ammonia can also combine with chlorine to form chloramines that are the most toxic. That's why city water needs the addition of dechlorinaters before adding the water to a tank that is cycling. Many people in my area have wells with water coming out about PH 6.5. If they add a little salt the affects of cycling are virtually eliminated. Every time you add fish to the tank after it has cycled it goes through this process again. It just does it faster with much smaller spikes. The bacteria bed needs time to grow to catch up to the additional waste from the additional fish. Just add fish gradually.
Many people here will promote the fish-less cycling methods. These basically allow you to cycle the tank by adding ammonia to the water. It can be a good method but most beginners already own fish and have them in the tank before they find out about it. Many more are unwilling to wait. New pretty tank has to have something swimming in it thing. Some potential problems with the fish-less method are that if not done correctly, the bacteria bed isn't going to be sufficient for the amount of fish you will be adding and can lead to additional large spikes.
Some other terms you will see are bio filters and references to biological filtration. Biological filtration simply refers to the process of the bacteria converting ammonia to nitrite and then nitrate. Bio filters are any surface area that allows additional room for bacteria to grow. Everything in a filter will grow bacteria but products like bio-bags and cartridges that are thrown away and replaced with new sterile ones are not usually considered bio filters.
One of the oldest is the under-gravel filter. Basically it is a plate on the bottom of the tank that gravel is placed on. The tubes and air pumps pull water down through the gravel. This allows the entire bed of gravel to grow bacteria instead of just the top half-inch where oxygen reaches. The drawbacks are that they pack with waste and the cracks get clogged leading to a channeling affect where water only passes through an area maybe the size of a dime. These need lots of vacuuming to remain open. Since it's an internal (underwater) method it is also subject to suffocation and die off during power outages. This can lead to deadly results while a tank that is fully stocked tries to recycle. Same danger with canister filters and any sealed biofilter plus you get the strong possibility of anaerobic bacteria growing in them when the oxygen is used up. Anaerobic bacteria produce some very toxic by products that even a little pumped back into the tank when the power comes back on can kill everything. HOB filters (hang on back) can have biological additions. A sponge that is left in permanently other than rinsing is common. Trickle systems where water is sprayed over bio media usually in a separate tank underneath are another common form.
The most efficient form of bio filter with the lowest clogging potential and least maintenance is a rotating biological contactor. (RBC) The most common one to the hobby is the bio-wheel by Marineland. It basically spins as water touches it causing it to be exposed to water where the bacteria grab lots of ammonia and nitrite, then is rotated up into the air where there's up to 30,000 times more oxygen available. Basically it supercharges the bacteria and allows smaller numbers to work more efficiently. This also reduces the amount of oxygen removed from the water by bacteria in the tank. Leaves more for the fish. This is real important during power outages. Also by having your main bacteria bed outside the tank it can be preserved during power outages by dipping the wheel in the tank water once or twice a day. Same thing if you have to move or break the tank down or medicate with chemicals that can kill the bacteria inside the tank. Just set the wheel aside and don't let it dry out. If you're moving don't seal it up in a bag and suffocate it. When the move is over or the medicine treatment has been completed you can then re-install the wheel and have little or no spikes.
Some other things to consider are the different products out on the market for ammonia. Ammo-chips and ammonia binding liquids are the most frequent. These products can come in useful during emergencies but should not be used long term. They would compete with the bacteria for the ammonia and result in smaller quantities of bacteria leading to a dependence on the continual addition of them. Many supplements are out that either claim to contain live bacteria or the things bacteria need to grow. Most of these are worthless. Some may speed things a little but none worth the price. Many even claim to "optimize the amount of nitrobacteria per dose" Nitrospiro has now been shown to be the bacteria responsible for converting nitrite to nitrate in aquatic environments. Nitrobacteria does this in soil and is almost impossible to find in an aquatic environment even when added according to the directions. I believe the only way they aid in the development of a good bacteria bed is by adding the wrong type that then die and produce ammonia to feed the correct kind.
A few additional thoughts.
Another method of filtration is called reverse flow undergravel filtration.(RFUGF).This basically has a powerhead pump water usually prefiltered by a sponge down the tube and up through the gravel on an undergravel filter plate.It does offer some advantages compared to standard UG filtration.When maintained properly it can keep the gravel from clogging with debris. Most of the debris will be trapped in the pre-filter. This may offer better nutrient flow to the roots of plants and keep much food and waste from settling into the gravel.The bacteria will still develop on the gravel as with standard UG filtration but it has the same dependency on water movement to provide oxygen to the bacteria so care should be taken in times of power outage.
Plants can add much to a tank in terms of ammonia and nitrate removal as well.They do not neccesarily qualify as bio filtration but reduce the need or dependency on additional biofiltration as they feed or remove these from the water as they grow.They can also bring substantial quantities of bacteria with them to speed to aging of the tank.One danger though is if they do not grow and start to die they can rapidly break down and have the ammonia levels in the tank go up.As with anything be observant and take the necessary actions to promote their growth.