The Complete Ablution (Al-Ghusl)
     Ghusl means to wash the entire body with water. Says    Allah in the Qur'an, "If you are sexually impure, purify    yourselves." And, "They question you concerning    menstruation. Say: It is an illness, so let women alone    at such times and do not have sex with them until they    are cleansed" (al-Baqarah 222).
    
Discharge of sperm (al-Mani) owing to stimulation while asleep or awake
The opinion of the jurists in general is that ghusl is a must should one have a discharge of al-mani (sperm) owing to stimulation while asleep or awake. Abu Sa'eed reported that he heard the Messenger of Allah, upon whom be peace, say, "Water (washing) is (needed) after (ejaculation of) sperm." (Related by Muslim.) Umm Salamah reported that Umm Sulaim said, "O Messenger of Allah, Allah is not ashamed of the truth. Does a woman have to perform ghusl if she has a wet dream?" He said, "Yes, if she sees the liquid." (Related by al-Bukhari, Muslim and others.) There are some other points of importance that need to be noted:
If the sperm is discharged without any type of stimulation (owing to illness or extreme cold)
     In this case, ghusl is not obligatory. 'Ali reported that    the Prophet, upon whom be peace, said to him, "If sperm    is ejaculated, perform ghusl." (Related by Abu Dawud).
         Said Mujahid, "We were in a meeting in the mosque with    the companions of Ibn 'Abbas (Tawus, Sa'eed ibn Jubair    and 'Ikrimah). When he stood to pray, a man came in and    said, 'Is there one who can give a legal verdict?' We    said, 'Ask your question.' He said, 'Whenever I urinate,    a liquid always follows it.' We asked, 'Is it the type of    liquid that gives birth to children?' He said, 'Yes.' We    said, 'Then you have to perform ghusl.' The man went    away. Ibn 'Abbas hurried to finish his prayer, after    which he told 'Ikrimah to bring the man back. He turned    to us and said, 'Is your verdict found in the Book of    Allah?' We said, 'No.' He asked, 'Is it based on the    sayings of the Prophet, upon whom be peace?' We said,    'No.' 'Then from what?' We said, 'From our opinion.' He    said, 'That is why the Messenger of Allah said that one    learned man is more difficult for Satan than a thousand    worshippers.'  The man came and faced Ibn 'Abbas, who    said to him, 'When that happens, is it owing to any    stimulation?' He answered, 'No.' Ibn 'Abbas asked, 'Do    you feel any numbness in your body?' He answered, 'No.'    Said Ibn 'Abbas, 'That is from the cold. Ablution is    sufficient."'    
We are identifying and building the related set of Ayahs for this Hadith. Please share your feedback and let us know if you identify any referencing issues.
"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari