Being attracted to a member of the opposite sex is perfectly natural. That is the mechanism that God gave us so we could perpetuate our species.
However, as human beings we can and should control our desires to focus on our own spouses (if we are married) or on legitimate singles of the opposite sex (if we are not). If the object of our desires is inappropriate - married, too old, too young etc then we need to divert our attention elsewhere. Prayer, finding another partner or talking to friends can all help to keep us out of trouble.
It’s a bit tougher when you are young and the hormones are almost uncontrollable, but it is very possible and essential that you do everything possible to control your desires. Part of growing up and maturity is to recognize and give up your more baser instincts. It also helps to stay away from those situations where you may be more tempted.