In the Hanafi school, combining two prayers (jama’) can only be done at Arafat and Muzdalifah during Hajj. At Arafat, the Dhuhr and Asr prayers are combined at the time of Dhuhr (jama’ al-taqdim), and at Muzdalifah, the Maghrib and Isha prayers are combined at the time of Isha (jama’ al-takhir). Outside these two occasions, jama’ is not permitted in the Hanafi school.
In contrast, the Shafi’i, Maliki, and Hanbali schools permit jama’ in various situations, including travel, adverse weather conditions (rain, mud, snow), and illness. Both jama’ al-taqdim (early combining) and jama’ al-takhir (late combining) can be done under these circumstances.
Only the Dhuhr with Asr and Maghrib with Isha can be combined; Fajr cannot be combined with any other prayer. When jama’ al-taqdim is done, one must intend to combine at the time of Dhuhr. For jama’ al-takhir, the intention must be made during the time of the first prayer. Moreover, the prayers must be performed in order: for example, when combining Dhuhr and Asr, Dhuhr is prayed first, followed by Asr. In the case of combining Maghrib and Isha, Witr prayer is performed after the Isha prayer.