Original: The building has a mosque built around it, the Masjid al-Haram. All Muslims around the world face the Kaaba during prayers, no matter where they are.
Simplified: The mosque was built around the original Kaaba.