Both male and female cats spray urine as a way of marking their territories. Spraying is most common in cats who are not neutered and in households with many cats.
Many people think that cat spraying means there is a problem with the animal using the litter box, but it is actually a problem with communication between two animals that consider themselves to be alpha cats. In the wild, cats have their own territories and do not live in large packs with each other. In order to claim their hunting and living territories, they spray to warn other cats not to intrude instead of fighting each other. If your cat has a spraying problem, it means that he has a problem with a new cat in the house.