You add chlorine to get rid of it, but it may take a lot. It will take around 8 times the ppm ammonia level so if you measure 5 ppm ammonia, then it's around 40 ppm chlorine to get rid of it. You can either just add 10 ppm chlorine at a time, measuring after 10-20 minutes to see if it is holding, then add more if it isn't (i.e. if it's close to zero) or you can do a bucket test to estimate how much it will take. 1/4 teaspoon of 6% bleach in 2 gallons of pool water is 10 ppm Free Chlorine (FC).

The best chlorine to use is either chlorinating liquid or 6% unscented bleach because these will not increase the Cyanuric Acid (CYA) level nor the Calcium Hardness (CH) level.

In order to get high ammonia levels in your pool, your pool must have had the chlorine level get to zero to allow bacteria to grow and convert CYA into ammonia. So this problem is easy to prevent and a short-term pain to deal with. I even accidentally had this happen to me and I describe it here.