Is it your? is it a stray cat?
If It's yours, I would just lock it in a different area in the house for about a week with a litter box until the cat get used to peeing in the box which is elsewhere.
If it's a stray cat then take it to a salter or find a home for it.
If it's a male cat then he's probably marking territory andwould stop it if you get the cat fixed.