What you can do
Choose your associates carefully. If your friends and classmates start to talk about immoral sex, joining in will only make it more difficult for you to control your thoughts. Often, you can find a way to leave such conversations without appearing self-righteous and inviting ridicule.
A teenage boy funneling trash into his mind
Would you allow viruses to invade your computer? Then why invite immoral thoughts into your mind?
Shun immoral entertainment. Much of today’s entertainment is designed to arouse improper sexual feelings. The Bible’s counsel? “Let us cleanse ourselves of every defilement of flesh and spirit, perfecting holiness in God’s fear.” (2 Corinthians 7:1) Steer clear of entertainment that stimulates sexual desires.
Remember this: Sexual feelings aren't evil in themselves. After all, God created man and woman to have a strong attraction for each other, and satisfying sexual desire is proper within marriage. So if you experience intense sexual urges, don’t think that you’re inherently bad or that you’re just not cut out for moral cleanness.
The bottom line: You can choose what you will let your mind dwell on. Both in your thinking and in your conduct, you can be chaste if you choose to!