It takes a few weeks to cycle a tank with fish, probably 4 to 6. You add the fish and their waste starts the nitrogen cycle. The nitrogen being ammonia, nitrite and nitrate. You test the water every day for traces of ammonia and nitrite. If you have a positive test, you remove and replace 25 percent of the water. This will keep the water relatively safe for the fish and leave enough of the nitrogen for the bacteria to use for growth.
Just test and change the water until you have several daily tests that read "0" for ammonia and nitrite. When you do, the tank is cycled. From then on, you change half the tank water weekly and you have safe water conditions for the fish and plants for as long as you have the tank.
Pretty simple, but this is the only way I know to get the water safe for the fish.
"Fear not, my young apprentice. Just change the tank water."