Urinating outside of the litterbox is commonly a sign of urinary discomfort. Possible medical causes of this can be a urinary tract infection, bladder stones, bladder masses, and sterile cystitis. In a male cat, urinating in inappropriate locations can be an early sign of a urethral blockage (which is very serious and should be addressed with a vet ASAP).