If you need to stop masturbation try to do the following;
1. Staying Busy and Focused

Find another outlet for your time and energy. Fill your life with engaging activities. The excitement of doing something different can help replace the urge to masturbate, and you’ll have a go-to distraction next time you’re tempted. You may start to deals with sports,learn to play a musical instruments and drawing.
2. Make a plan for avoiding masturbation

Make a plan for avoiding masturbation during your go to times of the day. If you have problems before going to bed or in the shower, refrain from any temptation to masturbate. For instance, if it’s a problem late at night, drop to the floor and do push-ups until you’re too exhausted to do anything but fall asleep. If you find shower time too tempting, start using ice cold water only – you won’t want to be in there for long; cold shower will offer the added benefit of saving you time and water.
If you always masturbate when you get home from school, make sure to have a solid plan to stave off any boredom you may feel. If you have so little to do that your mind frequently wanders to sexual thoughts, occupy your schedule.Also if you masturbate at Night time, try to sleep with more than just one layer of clothing so touching yourself is more of an effort.
3. Limit your solitude

If you masturbate frequently because you feel lonely, find ways to be as socially engaged as possible. This means that you should join as many clubs or activities as you can, accept and give more invitations to people, and go out of your way to make more friends.Another thing you can do is to limit the times when you are likely to be home alone. If you tend to masturbate in the hour or two before your parents get home from work, go for a walk during that time, or do your homework in a library.
Even if all of your friends are busy, you can still limit your impulse to masturbate by going out in public.
4. Stop watching porn
One of the reasons you may be masturbating so much is that you know that you can access porn within seconds if you desire. Stopping a masturbation addiction won’t hit you like a lightning bolt. It’s a process that requires commitment, and you might make mistakes or relapse on occasions. The real struggle is persevering, so commit now that you won’t let little mistakes stand in your way. Bribe yourself to stay on-track with rewards for good behavior.