And [mention] when We made the House [i.e., the Kaʿbah] a place of return for the people and [a place of] security. And take, [O believers], from the standing place of Abraham a place of prayer. And We charged Abraham and Ishmael, [saying], "Purify My House for those who perform ṭawāf1 and those who are staying [there] for worship and those who bow and prostrate [in prayer]."
Translation: Saheeh International (English)
1 A form of worship particular to the Kaʿbah consisting of going around it in circuits.
لِلطَّآئِفِينَfor those who circumambulatelilṭṭāifīna
وَٱلۡعَٰكِفِينَand those who seclude themselves for devotion and prayerwal-ʿākifīna
وَٱلرُّكَّعِand those who bow downwal-rukaʿi
ٱلسُّجُودِand those who prostratel-sujūdi
Tafsir
The Qur’ān relates that Allah made the Kaaba a place for people to return to, as a means of connecting their hearts to Him. When they travel from it, they return to it. It has also been made a safe place for them where they will not be attacked. Allah tells people to make the stone which Abraham stood on while he was building the Kaaba into a place of prayer. Allah instructed Abraham and his son Ishmael to purify the sanctuary from filth and idols for those who wish to worship in it, go around the Kaaba, stay there for worship, praying and so on.