There are various reasons cats will pee outside their box. Bladder problems, if it isn't clean, or if they're in heat. If the box was clean I would suggest taking it to the vet to get it checked just on case. I had a cat that peed everywhere before we managed to get her fixed, so it might not be anything bad.
And that's when you pick that cat up, rub his face literally into his pee, all while yelling at how much of a bad cat he is. Because that shit would not fucking fly in my house.