The Ritual Impurity is of two kinds: Minor ritual impurity and Major ritual impurity. The Minor ritual impurity is the occurrence of whatever invalidates the wudu‘, such as emitting gas, urine, or feces. The Major ritual impurity is the occurrence of any of the five (5) matters that mandate the purificatory bath (ghusl). These are:
1- Emitting maniyy,(semen)
2- Sexual intercourse,
4- Post-partum bleeding (nifas), or
5- Giving birth.
Deeds Prohibited for One in a state of Minor or Major Ritual Impurity.
1.Touching the Glorious Qur'an: it is prohibited for one in a state of (minor or major ) impurity to touch the Glorious Qur'an unless with something that prevents direct contact, for Allah, The Exalted be He, says,
لا يمسه إلا المطهرون
:("None shall touch it except the purified).Qur'an:Al-Waaqi'ah:79.
It is worth mentioning here that ,one who is in a state of major impurity is neither allowed to touch the Quran or even read from memory. The proof of this is what was related by Ali (may Allah be pleased with him) that he said:" Nothing prevented him( i.e. the Prophet(peace and blessings of Allah be upon him ) from reciting) the Qur'an other than being in a state of janaaba(major impurity)"(reported by Ahmad and others). This proves that it is impermissible for the person in a state of major ritual impurity to recite the Qur'an.
2.Offering Prayers. Scholars uniformly agree that it is impermissible for one in a state of minor or major ritual impurity to perform prayer at all, be it obligatory or supererogatory, provided one is able to purify oneself. This is because Allah ,Exalted be He, says which can be translated as :"O you who believe! When you rise to pray, wash your faces and your hands and arms to the elbows, and wipe your heads, and your feet to the ankles. If you had intercourse, then purify yourselves…". (Qur'an: Maa'idah: 6). It is also related by Muslim and other compilers of Hadith that the Prophet of Allah salla llaahu alaihi wasallam (peace and blessings of Allah be upon him) said:" Allah does not accept a prayer without purification.".
He also said:" Allah does not accept the prayer of anyone of you if he passes urine or stool until he performs the ablution ( a new one).(Agreed upon).
3. Performing Tawaaf(Circumambulating the Ka'bah). It is impermissible for one in a state of ritual impurity to perform Tawaf, for the Prophet(salla llaahu alaihi wassalam(peace and blessings of Allah be upon him) said:" Tawaf is (considered )a prayer; except that Allah made it lawful to speak during Tawaf."
4.Staying at a Masjid(Mosque). This prohibition is peculiar to Major Ritual impurity ,be it janaaba( seminal discharge or sexual intercourse),menstruation or postnatal bleeding. The proof of this, is the saying of Allah ,may He be Exalted which can be translated as: " O you who believe! Do not approach the prayer while you are intoxicated, until you know what you are saying ; or in a state of janaaba except those passing through[ a place of prayer], until you have washed (your whole body)" (Qur'an: An-Nisaa:43).
This means that one in a state of major ritual impurity is prohibited to enter a masjid to stay therein. In addition ,in an authentic tradition related by Abu Dawood on the authority of Aa'isha(may Allah be please with her), the Prophet of Allah salla llaahu alaihi wasallam(peace and blessings of Allah be upon him )said:" I do not deem the masjid lawful for a menstruating woman or for a person who is in a state of janaaba(major ritual impurity)".
However ,if one in a state of major ritual impurity performs ablution, it is permissible for one then to stay in a masjid as it is established that some of the companions of the prophet(peace and blessings of Allah be upon him) used to do so.