The Quran says that Abraham and Ishmael, peace be upon them, were raising the foundations of the House, praying 'Our Lord, accept this from us', and that Allah prepared the place for Abraham, saying, 'Ascribe no partner to Me and purify My House for those who circle it, those who stand and those who bow and prostrate.' It also calls it the first house established for mankind. The Prophet Muhammad ﷺ was asked which mosque was first set up on earth and said, 'The Sacred Mosque,' and then the mosque in Jerusalem, with forty years between them.
Over centuries, the Arabs filled the area with idols. When the Prophet ﷺ entered Mecca at the conquest, there were three hundred and sixty idols around the Kaaba, and he pushed them with a stick in his hand, saying, 'Truth has come and falsehood has vanished.' The Kaaba was cleared and brought back to the pure worship of the One God for which it was built. His wife Aisha reports that he once told her that he would have rebuilt it on the foundations of Abraham, had her people not been so recently out of unbelief.
Today the Kaaba is draped in a black cloth, and in one corner is the Black Stone. Muslims circle the Kaaba in tawaf, but do not pray to it. They pray to Allah who is the Lord of the House, as the Quran says. Umar, addressing the Black Stone, said, 'I know that you are a stone that neither harms nor benefits, and had I not seen the Prophet kiss you, I would not have kissed you.' Facing the Kaaba is what unites Muslims worldwide in one direction.