All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ʻalayhi wa sallam, is His slave and Messenger.
Watching pornography is a grave evil and a serious plague. It is not a remedy; rather, it is a disease as it ignites the flames of fitnah (temptation) and urges the individual to commit immoral acts. The proof is that this young man has become more addicted to watching pornography than he was earlier. Perceiving pornography as a solution is like jumping out of the frying pan into the fire. It must be avoided using reason and by conforming to Islamic law.
If your friend keeps repenting of watching pornography and then yields to the urge to watch it again, then he is torn apart between (the forces of) good and evil inside him; the stronger of them will prevail at the end. Ibn Al-Qayyim wrote about the sick heart:
“This is a heart with both life and an illness. The former sustains it at one moment, the latter at another, and it follows whichever one of the two that manages to dominate it. It has love for Allaah, faith in Him, sincerity towards Him, and reliance upon Him, and these are what give it life. It also has a craving for desires and sinful pleasure and strives to experience them. It has envy, arrogance, self-admiration, self-conceit, love of superiority and a tendency to cause corruption on earth, which can lead to its own destruction. It is motivated by two callers: one calling it to Allaah and His Messenger and the Hereafter, and the other calling it to the fleeting pleasures of this worldly life. It responds to whichever one of the two happens to have the most influence over it at the time. That sick heart wavers between its safety and its ruin...”
Hence, this man must repent to Allaah of this sin and give it up; he should remember that he may die in that state; verily, (the rewards of) the deeds are determined by the last of them.
When a person yearns to marriage and can afford it, he is obliged to get married; if he has no wealth of his own but his father is financially able to pay his marriage expenses, then, according to the opinion of some scholars, the father is obliged to help him get married. Studying is not an impediment to marriage according to the sharee'ah and common practice as well. In fact, the person may be showered with greater blessings beyond his expectations because of his marriage; Allaah, The Exalted, says (what means): {And marry the unmarried among you and the righteous among your male slaves and female slaves. If they should be poor, Allaah will enrich them from His bounty, and Allaah is all-Encompassing and Knowing.} [Quran 24:32]
Moreover, Abu Hurayrah reported that the Prophet, sallallaahu ʻalayhi wa sallam, said, “There are three who are promised the help of Allaah: The mukaatab (i.e. the slave who has made a contract of manumission) who wants to buy his freedom, the one who gets married seeking to keep himself chaste, and the mujaahid who fights in the cause of Allaah.” [At-Tirmithi and An-Nasaa'i]
However, if he cannot afford to get married, then he is enjoined to fear Allaah and adhere to patience until Allaah enriches him; Allaah, The Exalted, says (what means): {But let them who find not (the means for) marriage abstain (from illicit sexual relations) until Allaah enriches them from His bounty...} [Quran 24:33] He is advised to do whatever helps preserve his chastity, some of which is the following:
Firstly, he should sincerely resolve to guard his chastity and implore Allaah to help him do that. If Allaah finds him sincere in doing so, He will safeguard him from the evil of temptation. Allaah says about Prophet Yoosuf (Joseph) (what means): {He said, "My Lord, prison is more to my liking than that to which they (women) invite me. And if You do not avert from me their plan, I might incline toward them and (thus) be of the ignorant." So his Lord responded to him and averted from him their plan. Indeed, He is the Hearing, the Knowing.} [Quran 12:33-34]
Secondly, he should fast; it has been narrated on the authority of ʻAbdullaah ibn Masʻood that the Prophet, sallallaahu ʻalayhi wa sallam, said, “O young people! Whoever among you can marry should marry because it helps him lower his gaze and guard his chastity, and whoever is not able to marry should devote himself to fasting as fasting is a restraint for him (i.e. a means of controlling sexual desire).” [Al-Bukhari and Muslim]
Thirdly, he should keep the company of good and righteous people and avoid the company of evil people. It has been narrated on the authority of Abu Hurayrah that the Prophet, sallallaahu ʻalayhi wa sallam, said, “A man follows the religion of his friend; so each one should consider whom he takes as a friend.” [Ahmad, Abu Daawood, and At-Tirmithi]
Fourthly, he should avoid staying alone and preoccupy himself with whatever is beneficial in his worldly or religious affairs; Ibn ʻAbbaas narrated that the Prophet, sallallaahu ʻalayhi wa sallam, said, “Two blessings which many people squander: good health and free time.” [Al-Bukhari]
Lastly, we implore Allaah to guard him and bless him with marriage soon.
Allaah knows best.