So you found out that the cat has gone to the bathroom on the carpet.
First you are going to do is absorb it, blot it, and dry it, because what you have left over is your salt and the ammonias. And one of the best ways to neutralize that with vinegar and vinegar, just a little bit, will break down that salt, will break down that ammonia and leave your carpets fresh smelling again.