Ghusl is often translated as "full ablution", as opposed to the "partial ablution" of wuduوضوء that Muslims perform after lesser impurities such as urination, defecation, breaking wind, deep sleep, and light bleeding.
O you who have believed, do not approach prayer while you are in a state of drowsiness
until you know what you are saying or in a state of janabah, except those passing through [a place of prayer], until you have washed [your whole body]. And if you are ill or on a journey or one of you comes from the place of relieving himself or you have contacted women and find no water, then seek clean earth and wipe over your faces and your hands [with it]. Indeed, Allah is ever Pardoning and Forgiving.[Quran4:43 (Translated by Sahih International)]
The phrase translated as 'intercourse' in this verse has been interpreted by Hanafi scholars to mean sexual contact, while Shafi'i scholars interpret it to mean both physical and sexual contact. Hence, the Hanafi school of thought does not require one to take wudu if there is non-sexual contact with a member of the opposite sex, while the Shafi'i school of thought does require wudu before salah and so on.
Farā'id of Ghusl (Hanafi Guidelines)
There are four fard (obligatory) acts. If one of these acts is omitted, it must be returned to and completed before the remaining acts.
Optional alternate method as demonstrated by the Islamic Prophet Muhammad:
Washing both the hands up to the wrists.
Wash the private parts and remove dirt or filth from the body.
Water should be poured over the head three times so that it flows all over the body.
Pour water on the right shoulder three times.
Pour water on the left shoulder three times.
In Islam, ghusl requires the washing of the full body. There are some differences in details between the Sunni and the Shia schools of thought.
Sunni school of thought
Start by making niyyah (intention) to perform Ghusl, say bismillah (in the name of Allah) and cleanse yourself of impurities.
Wash the right hand up to and including the wrist (and between the fingers) three times, then similarly for the left hand.
Wash the private parts and remove dirt or filth from the body.
Perform Wudu as if for prayer. Ensure that the mouth and nostrils are thoroughly rinsed three times. If sitting on a stool or stone while bathing then the feet should also be washed when performing Wudu. But if sitting in a muddy place, feet should not be washed at this stage.
Water should be poured over the head three times so that it flows all over the body, ensuring that the roots of hairs and parts not easily reached by water such as the back of the knees are washed thoroughly.
Pour water over the both shoulders three times each (starting from the right shoulder). Hands should be passed all over the body when water is poured so that no part of the body is left dry.
Move to a clean spot and wash the feet if not washed during Wudu
If, after Ghusl, one recalls that a certain portion of the body is left dry, it is not necessary to repeat the Ghusl, but merely wash the dry portion. It is not sufficient to pass a wet hand over the dry place. If one has forgotten to rinse the mouth or the nostrils, these too could be rinsed when recalled after Ghusl has been performed.
The following hadith describes how ghusl should be performed by Sunni Muslims.
When Allah's Messenger bathed because of sexual intercourse, he first washed his hands; he then poured water with his right hand on his left hand and washed his private parts. He then performed wudu as is done for prayer. He then took some water and ran his fingers in the roots of his hair. And when he found that it had been properly moistened, he poured three handfuls on his head and then poured water over his body and subsequently washed his feet.
Ghusl should be made in a place of total privacy.
In another hadith, Ibn Abbas stated that Maimuna said that Muhammad was given a towel after ghusl, but he shook off the water instead of rubbing his body with it. In addition, Ibn Abbas recorded the following hadith on the authority of his mother's sister.
A hadith attributed to Maymunah bint al-Harith reports:
I placed water near The Messenger of Allah to take a bath because of sexual intercourse. He washed the palms of his hands twice or thrice and then put his hand in the basin and poured water over his body then struck hand against the earth and rubbed it with force and then performed ablution for the prayer and then poured three handfuls of water on his head and then washed his whole body after which he moved aside from that place and washed his feet, and then I brought a towel (so that he may wipe his body), but he returned it.
Shia school of thought
There are two methods of performing ghusl. One is known as ghusl tartibi, and the other is known as ghusl irtimasi.
"Ghusl tartibi" means an ordinal bath, performed in three stages.
After washing away the najasat (e.g., semen or blood) from the body and after niyyat, the body has to be washed in three stages: head down to the neck; then the right side of the body from the shoulder down to the foot; then the left side of the body.
Each part should be washed thoroughly in such a way that the water reaches the skin. Special care should be taken while washing the head; the hair should be combed (e.g., with your fingers) so that water reaches the hair-roots. While washing the right side of the body, some part of the left side must be washed too, and vice versa.
"Ghusl irtimasi" means a bath involving immersion of the whole body in the water. It can only be done in a body of water, e.g., a pool, river, lake or sea. After washing away the semen or blood from the body and after niyyat, the whole body should be completely immersed in the water all at once, not gradually. One has to make sure that the water reaches all parts of the body, including hair and the skin under it.
Ghusl tartibi is preferred over ghusl irtimasi.
Recommendable acts of ghusl
What has been mentioned above are the wajib acts of ghusl; there are things which are recommendable (mustahabb, sunnat) during the ghusl. These recommendable acts are five:
Gargling three times and washing the nose three times.
Performing the acts of wudu before the actual washing
Wiping the hands on the whole body to ensure that every part has been thoroughly washed.
Combing the hair with the fingers to ensure that the water reaches the hair-roots.
(For men) Doing istibra' (urinating) before ghusl janabat. If a liquid comes out of a man's penis after completing the ghusl, and he doubts whether it is semen or urine, he does not need to repeat the ghusl as long as he also urinated before the ghusl. If he did not urinate before the ghusl, then he must repeat the process. This rule of istibra' applies only to men.