What you should probably do right away is a 50% water change to lessen the nitrites in the water immediately. Then keep doing a 50% water change every day or so until the tank is finished cycling.
To simplify the nitrogen cycle, when a tank is first set up it is pure, there is nothing living in it. Then you add fish, and the fish food and fish poo break down and rot and when this happens, it turns into ammonia, which basically kills your fish. But bacteria grows that eats the ammonia, and they eat it and turn it into nitrites. Then a different species of bacteria grows and eats the nitrites and turns them into nitRATES. Nitrates are less toxic to fish and can be removed by weekly partial water changes. These bacteria that you need grow mainly in your filter sponges, which si why you should never change a filter sponge or cartirdge, even if it says to on the box. Bacteria is your friend!
The fact that you HAVE nitrites shows that some of this bacteria is starting to grow. YAY!
But if you don't replace good portions of your water every day you will loose fish until enough bacteria have grown to keep the water free of nitrites. It just takes time.