Success in removing urine odor depends on several things. Is the odor in just one relatively small spot or does most of the carpet smell? Is the smell the result of 2-3 recent accidents or has an animal peed on it regularly over a period of time?
We had a dog that peed everyday in the corner of the room and it was some time before we discovered it. I had the carpet professionally cleaned. They cleaned that corner three times. After the first time they lifted the carpet and pad and cleaned the hardwood floor and the pad. The carpet still had a faint smell. We gave the dog to my mother and he never peed at her house. :)
Eventually I didn't notice the smell. Several years later we got a different dog who immediately started peeing in that corner even tho he hadn't peed in his previous home. I learned from the vet that tho the smell may decrease enough that people won't smell it that dogs still can and will instinctively pee there. Same for cats and cat odors.
My daughter moved into an apartment in which the carpet in the front closet smelled like cat urine. She treated it with an enzyme cleaner several times and sprayed it with Febreze. The odor is not noticeable unless your nose is close to the carpet looking for a dropped glove. Then you can still smell it. :)
If the smell is just on one part of the carpet use an enzyme cleaner that you purchase from a veterinarian or a cleaning supply store so that you know you're getting the right one that is strong. Grocery stores have them but I've found them too weak to be of much use on stains that have been there long enough to completely dry. They may work for fresh stains.
If the smell is present on large areas of the carpet I'm afraid you won't be able to get it out. Also, you don't tell us the circumstances. If you've moved into a place with a cat smellin the air it's likely the cat has urinated all over the house or apartment.
I hope that the worst case scenario is not the one you have. Hopefully its just in a small area and is a new stain, in which case some of the answers from others may work.