Madhab is a school of thought or fiqh (religious jurisprudence). Madhabs contain rulings based upon Qur'an and sunnah. Some people choose to follow one and some do not.
The main 4 schools of thought are Hanafi, Hanbali, Maliki and Shafi'i . These were Imams/scholars in Islam.
If I am wrong someone please correct me. I suggest you speak with your local Imam.
The article below may have some information for you.
The scholars of the Standing Committee for Issuing Fatwas said:
As for the reasons for the differences among the scholars, there are many, for example: none of them encompassed all of knowledge, so things that were known to others may have been hidden from one of them, and he may have understood the texts in a way that others did not understand them because the clear evidence was hidden from him. End quote.
Shaykh ‘Abd al-‘Azeez ibn Baax, Shaykh ‘Abd al-Razzaaq ‘Afeefi, Shaykh ‘Abd-Allaah ibn Ghadyaan, Shaykh ‘Abd-Allaah ibn Qa’ood.
Fataawa al-Lajnah al-Daa’imah, 2/178
Thus the following becomes clear:
1. It is obligatory for a Muslim to follow that which is in the Holy Qur'aan and that which is proven of the Prophet's Sunnah, and he does not have to follow a specific fiqhi madhhab.
2. There are many reasons for the differences between scholars, and these differences have been compiled in the book Raf’ al-Malaam ‘an al-A’immat al-A’laam, by Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him), and Asbaab Ikhtilaaf al-‘Ulama’ wa Mawqifuna min dhaalika by Shaykh Muhammad ibn Saalih al-‘Uthaymeen (may Allaah have mercy on him).
3. The imams of Islam are not only four; rather they are many, but Allah has caused these four imams to become famous; may Allah have mercy on them.
4. The way of these four imams and other imams of the Muslims is based on following and revering the texts, and they enjoined us to do that and forbade us to imitate them blindly. The one who is pleased with them as imams should be pleased with their way. None of the imams of Islam called on people to adopt his view and give it precedence over the views of anyone else, and Allah has stated that they are above that. Indeed it is proven from all of them they warned against doing this and advised people to follow the Qur'aan and Sunnah.
5. These madhhabs are like schools of understanding of the Qur'aan and Sunnah. The imams strove to work out the rulings that they thought were closest to the Qur'aan and Sunnah and there is nothing wrong with the Muslim following one of these madhhabs, but that is on the condition that if it becomes clear to him that the Sunnah of the Prophet is something other than what he has learned from his madhhab, then what he is required to do is to ignore the view of the madhhab and follow the Sunnah. This is the advice of these imams, as Imam al-Shaafa’i (may Allah be pleased with him) and others said: If the hadeeth is saheeh, then that is my madhhab.
6. People are not equal in their study of the texts of Revelation and they are not equal in their ability to understand those texts. Hence many Muslims are content to follow these imams. As these four imams became famous and had students who propagated their views, therefore you find some people following the Hanafi or Maaliki or Shaafa’i or Hanbali madhhab. Usually the madhhab of the common folk is the madhhab of their Shaykh in their city or village. There is nothing wrong with what the common folk do, because they are enjoined to ask the people of knowledge. But they do not have the right to denounce others for adopting a different opinion or to issue fatwas or to adhere fanatically to the words of their Shaykh. Rather when the truth becomes clear to him he must act upon it and not do anything other than that.
ALLAH KNOWS BEST