Water changes to get rid of the nitrites is always a good idea. prime will help but is temporary (it lasts ~ 24 hrs, so you need to dose daily for continued protection.)
You need to get to the root cause of the spike. Looking at this logically:
1. Did the biofilter died for any reason & you are seeing a mini-cycle - say a power outage (pads get dried or anaerobic), temp swing, a big pwc without dechlorinator, contamination of the tank with soap or other chemicals ....
2. Did the bioload increased & the filter is now catching up - eg someone dumped a bunch of fish food in the tank, something died & is rotting (not just the fish, look for the snails, plants, etc.) Doing a good gravel vac to remove gunk is a good start in removing some of the bioload, of course, remove anything that is dead.
3. Is this a test error? Nitrite & nitrate tests are tricky, and also cross react (ie high nitrate will show up as nitrite & vise versa). Before panicking, it might be good to test some tap water to make sure you are reading zero. (Kits can get bad.), and also test for other parameters to get a clue as to what is going on.
if you truly have nitrites, then a mini-cycle is happening. I am one for going back to basics & just do water changes until the filter catches up. Although using a binder (Prime) or adding salt to protect fish are alternatives.