According to Islam, man and woman are complementary to each other. Each sex is incomplete without the other. God, the Sublime, has created these two to be a source of peace and tranquility for each other. In a sense, human nature is complete only in the two together. Their emotional, sentimental, psychological and sexual needs are fulfilled in their union.
Marriage in Islam is viewed as an important and sacred union between a man and woman. It helps fulfill the needs of the two parties. Satisfaction and gratification of the sexual needs should be within the frame of (permanent or temporary) marriage. If it is not possible for a person to contract (temporary or permanent) marriage, it is necessary that he should take exercise and engage in any healthy activities or else observe fast to protect himself against sins.
According to Islam, man and woman are intended to complement each other. God, the Sublime, has created these two for each other. The Holy Quran says:
"And one of His signs is that He created mates for you from yourselves that you may find rest in them, and He put between you love and compassion; most surely there are signs in this for a people who reflect."
One of the needs of man and woman is the sexual need which originates in the sexual instinct, one of the bounties of God. Islam's approach towards this instinct is objective and realistic. That is to say, it has not allowed it to be completely suppressed; rather, it has emphasized on answering this need within the framework of Islamic rules and injunctions so that human chastity may not be harmed and affected. It is for the same reason that it has considered marriage to be a way for satisfying the needs of man and woman.
Marriage is a sacred union between a man and a woman; the religion of Islam has laid great emphasis on it. The Holy Prophet of Islam, peace be upon him and his family, said: "Whoever gets married, has safeguarded half of his religion therefore he should fear Allah for the other half."
The grand religious authorities have said: "Marriage is a recommended act by itself and if one fears that he might fall into haraam by not getting married, then marriage will become obligatory upon him."
There is no doubt that permanent marriage is not the only way for satisfying the sexual instinct. In fact, whenever a person is unable, due to financial, educational and job constraints, to contract permanent marriage, Islam has proposed and prescribed another form of sexual relationship in the name of "temporary marriage". Temporary marriage is a legal form of marriage intended in Islam to prevent sexual delinquencies.
If a young individual is somehow unable to contract temporary or permanent marriage, the following guidelines can help him in this regard:
A) He should engage in reading books, magazines and he may turn to other diversions so as to avoid fancying, falling into sexual thoughts and eventually deviating from the right path.
B) He should respect the limits which Islam has defined and determined for relationship between two non-mahram individuals.
The clearest plan Islam has worked out in this regard is as under: 1. Prohibition of casting lustful look at a non-mahram; 2. The necessity of modest covering and keeping away from showing off and flirting; 3. Avoiding physical contact with a non-mahram; 4. To avoid talking lustfully to a non-mahram; 5. To avoid wearing perfume to attract a non-mahram; 6. To avoid being alone together with a non-mahram.
C) One should not listen to sexually provocative music because music increases the sexual appetite. In fact, listening to music leads to some sort of sexual madness and insatiability.
D) Islam prescribes chastity and sexual modesty because modesty plays a very important role in the efficient prevention of sin and sexual delinquency. The Holy Quran says: "And let those who do not find the means to marry keep chaste until Allah makes them free from want out of His grace."
E) To avoid being alone or in a solitary condition.
F) Taking part in religious ceremonies like congregational prayer, du'a Kumayl etc. is beneficial. The Quran says: "Surely, prayer keeps (one) away from indecency and evil" especially when you offer the prayers with full concentration.
G) One should try to associate with religious and faithful people.
H) One should avoid being idle (having nothing to do). That is, he/she should always be busy doing a useful activity.
I) To be in the regular habit of reading something. For example, it would be good to read 10 pages of a book every day on the subject of resurrection.
There is no doubt that these suggestions are temporary solutions to your problem and they will be useful insofar as you, God willing, have the means to take action for permanent marriage.