The qibla changed from Jerusalem toward the Kaaba in Mecca in 624 CE.
Early Muslims initially prayed toward Jerusalem. During Muhammad’s leadership in Medina, Islamic tradition holds that the prayer direction was changed toward the Kaaba in Mecca. The change is associated with Quran 2:144 and is generally dated to 624 CE, the second year after the Hijra.
The qibla is the direction Muslims face during salah. It is not a physical line that must be identical from every location; worshippers face the direction of the Kaaba as calculated from where they are. Modern mosques commonly indicate it with a mihrab.
A common mix-up is assigning the change to 622 CE, the year of the Hijra from Mecca to Medina. The migration established the Islamic calendar’s starting point, but the qibla change occurred later.