Narrated Ibn Abbas (radiallaahu `anhu):
The Prophet (sallallaahu `alayhi wasallam) arrived at Mecca and performed Tawaf of the Kaba and Sa’i between Safa and Marwa, but he did not go near the Kaba after his Tawaf till he returned from Arafat.
The first one is called Tawaaf al-Qudoom and the one after `Arafaat is Tawaaf al-ifaadah during Hajj, which is also called tawaaf al-ziyaarah (tawaaf of visiting). It takes place after the standing in ‘Arafah, on the day of al-Adha or after it. It is one of the pillars or essential parts of the Hajj.