According to the Majority of  Muslim scholars changing of qiblah happened in the middle of Shaban, about sixteen months after the emigration.  During the Prophet’s night  Miraj, Allah  instituted the five daily obligatory Prayers for believers. And it was in the middle of a congregational prayer in Madinah, that Allah ‘s command came to the Prophet about the change of qiblah. Quran Says :

{سَيَقُولُ السُّفَهَاءُ مِنَ النَّاسِ مَا وَلَّاهُمْ عَن قِبْلَتِهِمُ الَّتِي كَانُوا عَلَيْهَا ۚ قُل لِّلَّهِ الْمَشْرِقُ وَالْمَغْرِبُ ۚ يَهْدِي مَن يَشَاءُ إِلَىٰ صِرَاطٍ مُّسْتَقِيمٍ} {The fools among the people will say: “What has turned them from the Qiblah to which they were used?” Say: To Allah belong both East and West; He guides whom He pleases to a Way that is straight} [Al-Baqarah:142]. For us as  muslims, none of the daily prayers can be done correctly without knowing the qiblah. “Qiblah” means orientation, or a sense of true direction. At the beginning of every Prayer, the Muslims face the house of God in Makkah, thereby spiritually connecting themselves along an invisible line that passes through every point on earth, to the spiritual center in Makkah. Whether they pray alone, or in congregation, they do so as part of the greater community of Islam

Therefore the qiblah has a significant role in bringing together every nation, race, and tribe on this planet regularly five times a day, so as to link them to the common center at Makkah. Being central to the worshippers in Islam, the qiblah serves as the heart of the Ummah of Islam,

One qiblaor Direction of prayers in Islam means that  Muslims all over the world  keeping the concept of unity in every sense of the term: God is One, the religion is one and the Ummah is one. Every time we stand in prayer, Muslims may say they make a spiritual journey to the Kabah in Makkah, somewhat as the Prophet did during his Night Journey to Jerusalem. And from the Kabah, our spirit travels upward towards Allah the Almighty just as the Prophet during his Ascension from Jerusalem. So for a pious and sincere worshipper, every prayer he performs involves Night Journey and an Ascension, as it were.   During his Ascension, in a mystical experience of immense spiritual significance, Prophet Muhammad (peace and blessings be upon him) led all the earlier prophets in prayer in Al-Aqsa mosque at Jerusalem. This was a wonderful event that symbolized not only the oneness of both the houses of worship – the Kabah and Al-Aqsa – but also the oneness of the guidance of Allah given through all the prophets. Because  Prophet Muhammad was sent as the final prophet for the whole of humanity consisting chiefly of the children of Abraham by his eldest son Ishmael, and the second son Isaac, (peace be upon them both). Jerusalem represents the line of Isaac, as Makkah does the line of Ishmael. The foregoing highlights the significance of both the cities serving as the qiblah of Muslims: First Jerusalem and then Makkah. The final prophet born in the line of Ishmael, the first son of Abraham,

That is to say, the change of the qiblah is a declaration by God of the perfection of the first religion as the final religion for mankind. Through the two mystical events in the life of the final messenger, Muhammad, Allah completes and perfects the religion for humanity and declares the Kabah in Makkah as the center of the world as well as of His religion.

In short , The qibla  was changed from Jerusalem to the kaba in Makkah for the Kabah is the first and most ancient House of Worship ever built for all humankind for the purpose of worshipping Almighty Allah alone, as stated in the Quran.

Almighty Allah says:

“The first House [of worship] appointed for humankind was that at Bakkah: Full of blessing and of guidance for all kinds of beings.” 

The shift of qibla from Jerusalem to the Kaba thus represents Islam’s stance of calling the humankind away from local or provincial shrines to the First Sanctuary, where the peoples are invited to give heed to the roots of their father, Adam (peace be upon him).