You have to find a substitute, a healthy substitute.
First try to find out why, are you bored? horny? Cant stop?
Then: Can you do something with the reason, if you managed to find it?
If so: Start with making an agreement with yourself, next time I want to watch porn I wil XXXXX. Could be jogging, call a friend, whatever you like as long as it do you good, in a healthy way.
If not: Do the above step anyway.
Be careful and avoid replacing the porn with a new addiction
Are you a woman? There is actually a syndrom called Pgad, gives a pain who can only be taken care of with masturbation. Think it's just girls, but not 100 % sure.
If nothing works - see a therapist