If the stain is dry, you will need to remove as much of the urine as possible by saturating the area with warm water and then soaking up the diluted urine with paper towels. On a wet stain, use paper towels to soak up as much of the urine as possible.
In a spray bottle, mix 50% white vinager with 50% water and soak the area with the solution. Then work the solution into the carpet with your fingers or a stiff brush.
Use paper towels or a wet vac to soak up the solution, and remove as much moisture as possible, so carpet is almost dry to touch.
Sprinkle the area with baking soda (A handful will do, don't over do the baking soda)
In an other spray bottle, mix half a cup of 3% hydrogen peroxide with a teaspoon of washing up liquid. Spray the hydrogen peroxide mix into the baking soda area and work into the area with fingers, ( use rubber gloves) or hard brush.
Allow the area to dry completely or leave overnight. When the area is completely dry, loosen the baking soda with a hard brush and hoover the baking soda from the carpet.
warning: Use gloves when dealing with hydrogen peroxide and don't be tempted to use a higher % than 3%, as may remove colour from your carpet.