Madhhab or Mazhab (Arabic مذهب mæðhæb pl. مذاهبmæðæːhıb) is an Islamic school of thought, or fiqh (religious jurisprudence). In the first 150 years of Islam, there were many such "schools" - in fact, several of the Sahābah, or contemporary "companions" of Muhammad, are credited with founding their own. The prominent Islamic jurisprudence schools of Damascus in Syria (often named Awza'iyya), Kufa and Basra in Iraq, and Medina in Arabia survived as the Maliki madhhab, while the other Iraqi schools were consolidated into the Hanafi madhhab. The Shafi'i, Hanbali, Zahiri and Jariri schools were established later, though the latter two schools eventually died out.
The four mainline schools of Sunni jurisprudence today, named after their founders (sometimes called the A’immah Arba‘a or four Imaams of Fiqh), are not generally seen as distinct sects, as there has been harmony for the most part among their various scholars throughout Islamic history.
Shi'a Islam has its own school of law,
The majority of Sunni Muslims believe that all four schools have "correct guidance", and the differences between them lie not in the fundamentals of faith, but in finer judgements and jurisprudence, which are a result of the independent reasoning of the imams and the scholars who followed them. Because their individual methodologies of interpretation and extraction from the primary sources (usul) were different, they came to different judgements on particular matters. For example, there are subtle differences in the methods of prayer among the four schools, yet the differences are not so great as to require separate prayers by the followers of each school. In fact, a follower of any school can usually pray behind an imam of another school without any confusion.
Generally, Sunni Muslims prefer one madhhab out of the four (normally a regional preference). Some, however, reject the four schools. Others (most notably the Salafi) accept the four madhhabs as legitimate, but also believe that ijtihad must be exercised by the contemporary scholars capable of doing so. Others insist on taqlid, or acceptance of religious rulings on matters of worship and personal affairs from a higher religious authority without necessarily asking for the technical proof as a requirement. This practice is very common amongst Sufis, who follow an Islamic mystical order, tariqah.