To control ammonia in an aquarium, well first all, a lot of new tanks will experience ammonia, and it's perfectly fine. You just want to make sure you don't have a lot of fish in the tank to experience the side-effects of high ammonia. Every tank goes through a cycling period where the bacteria is trying to stabilize in the filter, in the gravel, in the decorations. And until that bacteria settles in, you're going to experience high levels of ammonia and nitrite. Again, you don't want to have fish that are very sensitive to ammonia, because they will die. Ammonia is toxic to the fish.
In an established tank, if you're still getting elevated levels of ammonia, you want to look to the cause of that. It's usually from overfeeding, overcrowdedness, a lack of proper maintenance on your filter. If the filter is clogged and the bacteria that's in the filter doesn't have access to good water movement, or it can scavenge ammonia out of the water and break down the waste, you will experience elevated levels of ammonia.
If you overfeed, that food that gets broken down, once it gets broken down and dissolves, it's going to form ammonia. So keeping the filtration balanced with the biomass of the tank, in other words, having the right amount of fish for the right size filtration system, is key to keeping your ammonia and your nitrite levels, namely your nitrogen cycle, in check.
But if you do have ammonia and you need to save your fish, you can get ammonia-removing pellets. It's like carbon, but it's white. You can put it in your filter and that will scavenge out the ammonia right away. There's also chemicals you can by that neutralize the ammonia by converting it to a less toxic form called ammonium.
But again, these are band-aids. You want to look to the cause. You're probably overfeeding, or you're overcrowded, or you don't have a large enough biological filter, or your filtration system is clogged. So these are the things you really want to look at if your ammonia levels are high. But if you do have ammonia, you've got to knock it down or your fish are going to die.