The most important part in fish keeping is understanding The Aquarium Nitrogen Cycle. And going through different threads on the web, I still see people having a problem understanding the Nitrogen Cycle. If you don't understand the cycle you lose your fish, that's for sure. So, I am here to give the knowledge I perceive about The Nitrogen Cycle. It hasn't been long I understood the cycling process thanks to a website: where I learned about the process.

Before you add any fish to your aquarium, you need to cycle your tank to make the water parameter that the fish requires. for example, will you be able to bath with a cold water right after an intense exercise? will your body allow that? the simple answer is no. Your body will be in a sock, and your muscle will definitely cramp. likewise fish too gets in shock when you don't make the tank water right for your fish. the temperature should match, Ammonia and nitrite in your tank should be at 0 PPm and nitrate less than 20 PPM. 

Ammonia is a toxic gas, that you find in a contaminated water or your septic tank or even in your tap water. Luckily there are some bacteria in your tank that feeds on ammonia and produces nitrite as its waste these are nitrifying bacteria. However, nitrite is far more toxic than ammonia and are deadlier. But another colony of bacteria called denitrifying bacteria feeds on nitrite and produce nitrate. Nitrate is only harmful if it exceeds 20 PPM. But you don't need to worry if you continuously run air pump or have aquarium plants. air bubble helps to exchange the nitrate gs with the air and plants uses nitrate as a fertilizer. To eliminate excess nitrate you need to do a water change once a week. about 10% of aquarium volume.
There is no exact time span to cycle your tank. it might take days a week or even several months. So, I let my tank cycle for a month before adding new fish. 

If you want to use chemicals, the cheapest method is to use Ammonia. Add ammonia as a food source to nitrifying bacteria. They will do all the rest of the process.
Make sure, you test your water for Ammonia and Nitrite. At the beginning Ammonia will be high, so not to worry the will be a food source for nitrifying bacteria and will eventually fall down. when cycling let the reading be up to PPM.
here is the link to a full article about aquarium nitrogen cycle: