There is no one way to get rid of a tom-cat's spray smell, but an enzyme cleaner can be used successfully on most materials. Start by drying the area where the cat has sprayed and cleaning it once with a damp cloth. Follow with an enzyme cleaner, as normal disinfectants will not help remove the smell.
Do not use ammonia-based cleaning agents as the smell they leave behind will encourage the cat to go back and spray again. Unneutered males will usually start spraying once they reach sexual maturity, which is why they should be neutered when they are younger than six months. Feline spraying is not a litter box issue; instead it is a natural behavior hard-wired into every male cat.