Starve this sin. Get rid of phony stimulants. Destroy pornographic pictures and erotic books and magazines. Be careful to avoid movie pictures and videos with pornographic or suggestive scenes. Avoid friends with whom you may have engaged in the past in mutual cts of masturbation.
Boredom leads to trouble.
Spend more time reading the Biblea, good books, and making proper use of free time. Learn to resist temptation. That's the promise of God. There is tremendous power in the spoken word. God's power will come immediately to your aid and you will find that you can walk away with the peace of God permeating your being.