According to Seachem support Prime detoxifies ammonia for 24-48 hours by binding and converting it into a complexed iminium salt. This salt is a nitrogenous compound that can still be utilized by aerobic bacteria. In the same way they consume ammonia, these bacteria consume the iminium salt and release nitrite as a byproduct. Prime will also bind with nitrite and nitrate, however, it will not prevent bacteria from consuming these compounds as well. In an established tank, the beneficial bacteria should consume these things before Prime becomes inactive and releases it. If you still have ammonia/nitrite readings after 48 hours you can dose Prime again to keep them detoxified.