Sunnah refers to the deeds, sayings and approvals (including silent approvals) of Prophet Muhammad pbuh and the twelve Imams. The twelve Imams however also followed the sunnah of Prophet Muhammad pbuh, so the sunnah of the Imams, is in fact the sunnah of the Prophet Muhammad.
What does school of thought mean?
Schools of thought (madhahib) are the paths people follow to the Holy Qur’an and Holy Prophet Muhammad (pbuh&hf). Obviously, these schools of thought were founded considerably after the death of the Prophet (pbuh&hf) and, in fact, never took shape until the time of the Umayyid Caliphate. The common phrase ahl al-sunnah wal-jama’ah, for example, became prevalent during the third century hijri. By the year 250 h., the four Sunni schools of thought were being popularized and patronized during the ‘Abbasid Caliphate. The Shi’a school of thought, on the other hand, continued its growth and progress after Imam ‘Ali (pbuh) through his descendants who were connected to each other through a chain of narration and knowledge. The Holy Prophet Muhammad (pbuh&hf) and the designated imams in the Shi’a school of thought were shielded by Allah from any sin, religious error, or forgetfulness.
Today, the five schools of Islamic thought accepted by all Muslims are the Jaffari, comprising 23% of the Muslims; the Hanafi, comprising 31% of the Muslims; the Maliki, comprising 25% of the Muslims; the Shafi’i, comprising 16% of the Muslims; and the Hanbali, comprising 4% of the Muslims. The remaining small percentage follows minority schools such as the Zaydi and the Isma’ili.