Firstly, distinguish between spraying and urinating: spraying is a deliberate act of communication, which will be done on a vertical surface such as a wall. Urinating is the normal passing of urine onto a horizontal surface like the floor. Spraying can be a sign of serious upset but is usually a normal marking behaviour in un-neutered cats and in most animals out of the house. Some of these apparent toileting problems can have a medical basis so if you are unsure always get your vet to check your cat.
For any kind of spraying/urination, cleaning the area properly is very important to prevent recurrence, try the following:
1. Clean the area with a 10% solution of a biological or enzymatic washing powder / liquid.
2. Wipe area down with cool clean water and dry.
3. Spray area with a low-grade alcohol such as surgical spirit through a plant mister.
Pheromone sprays can be obtained from a vet to make your cat feel more settled but the area must be properly cleaned first. The longer this problem continues the more difficult it is to stop.