This includes looking at attractive and sexy figures, Though sexy figures should be the most avoided, you should also avoid looking at women.
In addition to avoiding looking, you should avoid touching women by shaking, hugging, etc.. This doesn’t mean that you shouldn’t act normally with near relative women/girls, such as sisters, mothers, aunts, daughters and nieces, since it’s acceptable to see them and touch them the proper way.
2-Avoid thinking about sex and stimulating things, and try to fill your time with something useful, especially Islamic study and worship.
You may also register in a club, group or maybe get a job. Try not to have a lot of time alone since that could turn you thinking about what stimulates your desires (though it’s recommended to have your own time where you can think about the world and yourself!).
3-Never engage in forbidden relationships.
4-Never masturbate: this is considered a dirty habit by Muslims and is punishable under Islamic law. If you start, you will find it very difficult to stop .
5-Avoid finding yourself alone with a girl/woman, since this is the most dangerous situation which will frequently lead to an illegal relationship.Remember that Shaytan is always the third one present.
6-Think about the guarantee promised by Islam. Islam gives you the ultimate guarantee of safety, provided that you obey its laws.
7-Find a worthwhile hobby, something to think about that interests you.
Whenever you get any idea of this kind or you are in a situation where you may have a chance to fulfill your desires, just start thinking about that very thing or idea that interests you. It may be about your time with your best friends or a journey or about something would like to do to bring you closer to Allah .
8-Fast to reduce sexual desires as per Islamic teachings.
The Prophet (PBUH) said: “O young people, whoever of you can afford marriage should marry because it is more (conducive to) lowering the gaze and more protective of the private parts; and whoever is not able to marry should fast, because fasting diminishes his sexual desire.