You ask what cycling means. Whenever a new tank is set up, it may take from 4 to 6 weeks to establish a colony of "good" bacteria that feed on organic waste materials and break them down into non-toxic forms; unless steps are taken to accelerate the process. This period is referred to as cycling a tank. The condition where a new tank is overpopulated before the needed colony is established is referred to as "new tank syndrome". High nitrites and nitrates are sympt0ms of this condition.
These bacteriia colonize on hard surfaces such as glass, rocks, filter media with high oxygen availability, and gravel. Making these materials with established colonies available in a new tank will shorten the cycle. You can also use commercially available products such as Stability which, when used as directed, allow you to stock a tank with fish while cycling it.
Your fish seem to be stressed by the polutiion in your tank. You might be able to save them by initiating the Stability process (or similar product). I have never used it this way as an anectdote though so maybe soneone else should comment on this approach.
But whatever, you have to take some action fast. And don't be discouraged. A lot of us have learned this lesson the hard way at some time or another.