عن مَرْثَد الغَنَويّ -رضي الله عنه- عن النبي -صلى الله عليه وسلم- أنه قال:«لا تصلُّوا إلى القُبُور، ولا تجلِسُوا عليها».
[صحيح.] - [رواه مسلم.]
المزيــد ...

Marthad al-Ghanawi (may Allah be pleased with him) reported: The Prophet (may Allah's peace and blessings be upon him) said: "Do not pray facing graves and do not sit on them."
[Sahih/Authentic] - [Muslim]

Explanation

The Prophet (may Allah's peace and blessings be upon him) forbade praying towards graves in such a way that the person praying is facing in the direction of a grave and he forbade sitting on them. This also includes debasing them by putting one's feet on them or relieving oneself on them. All these things are unlawful.

Translation: French Spanish Turkish Urdu Indonesian Bosnian Russian Bengali Chinese Persian Tagalog Indian Kurdish Hausa Portuguese Malayalam Telgu Swahili
View Translations
1: It is prohibited to pray towards graves, when the grave being in front of the worshiping person. Prohibition signifies the voidness of the prohibited thing.
2: It blocks all ways leading to polytheism.
3: It is prohibited to sit on graves, for this constitutes some sort of disdain for the dead people buried therein.
4: It combines both the prohibition to show undue reverence for graves, represented by praying towards them, as well as prohibition to treat them with disdain, by sitting upon them. So, Islam prohibits both the immoderate respect for and disdain of graves. No excess and no neglect.
5: The inviolability of a dead Muslim continues after his death, as supported by the Prophet’s statement: “Breaking the bone of a dead person is like breaking it while he was alive.” It is derived from this that it is wrong to humiliate the dead by cutting their organs after their death as some people do, for this involves disdain and torment for the dead. Hence, the scholars stated that it is prohibited to cut off any of the dead person’s organs, even if he has permitted to do so, for he has no right to dispose of himself.
6: It is permissible to lean upon a grave, as it differs from sitting. But if people come to regard this as a sort of humiliation, one should refrain from doing so. The criterion here lies in how a certain behavior is viewed. If people commonly consider some behavior as a kind of disdain for graves, it should be avoided, even if it is originally permissible.