Cats don’t always go to the bathroom in a litter box so for those times when your cat misses or deliberately sprays outside of the litter box, you need to clean up the cat urine right away.
Baking soda on a carpet can soak up any smells from the urine while bleach can be handy to get the small of cat urine out of your clothes. Also consider commercial pet deodorizers that can clean up urine along with the associated smell.
The bottom line is that your cat is probably a jerk and is urinating outside of the litter box for either medical reasons or just because it can boss you around. So arm yourself with plenty of paper towels and cleaners since the longer you own a cat, the more likely you’ll need to clean up cat urine at some point in your life.