When one first enters the Masjid al-Haram, it is sunnah to perform the Entering Tawaf (Tawaf al-Qudum) instead of tahiyyat al-masjid, i.e., instead of praying when one first enters the mosque, one circles the Ka^bah.
Tawaf is performed by circling the Ka^bah seven (7) times, keeping the Ka^bah to one’s left side, starting with the black stone, heading towards Hijr Isma^il . Hijr Isma^il is the nearly semi-circular area between one side of the Ka^bah and a short (approximately waist-high) wall constructed to show where that side of the Ka^bah, as originally built by Prophet Ibrahim, was. To perform tawaf, one must be clear of any ritual impurities (both minor and major) and be clear of najas-filth on one’s body or clothes or what one is carrying, as is the case when in the prayer. Should one lose wudu’, for example, one must reperform it, and continue the tawaf from where one lost wudu’. Tawaf must be performed inside the Haram Mosque, and outside the Ka^bah, which means outside the structure as it was originally built. Circling outside the mosque, like in the street, is not valid. One must take care not to cut inbetween the structure of the Ka^bah and Hijr Isma^il, because this was originally part of the Ka^bah as Prophet Ibrahim built it. Moreover, one cannot have any part of one’s body above the shadharwan, which is the rim at the base of the Ka^bah. Tawaf is valid if the person circles the Ka^bah walking (or crawling) on his own, while being carried by another, or while riding an animal. However, one must keep one’s left shoulder towards the Ka^bah. So, if for any reason, the person turns, then takes a few steps while his shoulder is not towards the Ka^bah, he must go back to the place to continue from where he turned. If there is a crowd, and he cannot back up, he continues with that round until he comes back again to that place from where he turned, and continues from there, and the round he just performed to get back to that place is not considered.
It is a recommended matter to kiss the black stone, (a stone originally from Paradise which is now part of the Ka^bah) or if one cannot reach it, to raise one’s hand towards it (when one passes by it). It is a recommended matter to make supplication and dhikr while making tawaf. The best is to say what the Prophet used to say the most while performing tawaf:
Our Lord, give us good things in this life, and good things in the Hereafter, and protect us from the torture of Hellfire.
اللهم ربنا آتنا فى الدنيا حسنة وفى الآخرة حسنة وقنا عذاب النار
One leaves the mosque, stepping out with one’s left foot first and says:
I start with the Name of Allah. Praise be to Him.
بسم الله والحمد لله
O Allah, raise the rank of Prophet Muhammad and his Al and protect his nation from that which he fears for them.
اللهم صلّ على محمد وعلى آله وسلّم
O Allah, forgive my sins
اللهم اغفر لى ذنوبى
Open for me the Gates of Your Generosity (Guide me to the ways in which I may earn Your Generosity ).
وافتح لى أبواب فضلك