A madrassa, in its most basic form, is a religious school that teaches Islam. In modern usage, they are schools that teach memorization of the Qur'an rather than reflection and interpretation. While the term has become associated with schools indoctrinating in extreme Jihadist theologies, theology and curriculum vary from region to region and from school to school. Not all such schools are not categorically tied to militancy, and their students are not necessarily poor. They are, as are mosques and public proselytizing events (tabligh) "“gathering” places where militant groups, religious ideologues, and potential recruits can interact."
Another view comes from Saleem Ali, who, while he has personal experience with violent militant graduates of madrassas, does not believe they are inherently sources of terrorists. He is, however, considerably concerned
that the educational system in madrassas does need to be reformed on the premise that the 200-year-old curriculum prepares the students to be good seminarians, but does not give them the skills necessary for other vital professions they may wish to pursue. Ali pointed however, that this change must come from within the madrassa system because any change imposed from the outside will only be resisted.
Especially in South Asia, the memorization-oriented madrassas are intimately associated with the mullah class. While the most general usage of "mullah" is one learned in Islamic law, it has taken on a connotation of an individual, strict in enforcing law and leading prayer, but not a scholar. Traditional authority came from three lineages; the mullah was a simple preacher with relatively little status.
- syed, or descent from the family of the Prophet,
- pir, or strong personal relationship to Allah, distinct from the communal Muslim tradition; especially important in Sufism
- ulama, religious scholarship
A driver of more powerful mullahs, however, was as a check against the Sufi mystics in South Asia. 
Madrassas are highly visible in Pakistan, but should be considered in the context of the overall educational system there: Cultural values of the majority of Pakistanis are derived from Islam. Since an education system reflects and strengthens social, cultural and moral values, therefore, Pakistan’s educational interventions have to be based on the core values of religion and faith.
In the overall context of Pakistani educations, an independent study puts madrassa enrollment at 1%: Of the young insurgents, a substantial number come from a subset of the madrassas, are radical Islamic schools, called madaris. Some madari leaders issue fatwas authorizing violence and a snall number of madaris actually conduct militant training. While it is more likely that a madari student will support violence, the 70% of Pakistani students in public schools also have a high approval for violence. Long-term solutions to reducing violence requires, therefore, educational reform.  A problem of the study that produced the statistics covering militancy, however, is biased because it did not include the potentially more radicalized schools in the Federally Administered Tribal Areas (FATA) and Northwest Frontier Province.
"Supply side analysis", applied to Pakistan, suggests that Lashkar e-Tayyiba (LeT), which operates outside Pakistan (e.g., it is suspected in the 2008 Mumbai attacks) is less likely to use madari students than Lashkar-e-Jhangvi (LeJ) and Sipah-e-Sahaba Pakistan (SSP). The latter two groups use less sophisticated methods, such as grenade throwing, initially against Shi'a mosques and similar "soft" targets. LeJ, however, may be retargeting Pakistani Security Forces in the FATA. 
"Taliban" can be translated as "seekers" or "students" of Islam, so "Lower-case" taliban were not new to Afghanistan. The traditional Taliban go back at least two centuries in Afghan history, to Ahmad Shah Durrani, a king who died in 1773 and established an Islamic identity. The classic Taliban had been a "loose Islamic civil service", returning to villages as teachers and religious leaders.
After sufficient study, a talib might become a mullah. Traditional taliban joined the Pashtunwali warrior ethos with piety, selflessness, which created a different approach to leadership. Few mujahideen bands did not have Taliban members, who were young, unmarried, and with a high tolerance for shahadat (martyrdom). The talibs were part of the band, but kept their identity, often eating and sleeping apart from the other fighters. Taliban leadership was made up principally of graduates of the Haqqania madrassa near Peshawar, Pakistan. That religious school's teachings drew from a 19th century Indian Salafist Muslim movement called Deobandism, which argued against modernization and believed that Muslims needed to live in the same way as the Prophet and his Companions. It was influenced by Wahhabi thinking and many Deoband madrassas have direct or indirect funding from sponsors in Saudi Arabia. The students making up the core of the Taliban, however, had grown up in a radical Deoband Islamic environment outside Afghanistan; their religion was more central than their tribal identity 
During the Afghanistan War (1978-92), "a new kind of madrassa emerged in the Pakistan-Afghanistan region -- not so much concerned about scholarship as making war on infidels." Unquestionably, the Taliban in Afghanistan came significantly from a madrassa background, but they were initially a rising against lawlessness in their country, then a Salafist movement once in power, and a supporter of external terrorism rather than themselves a terrorist movement like their guest, al-Qaeda. The Taliban also changed from their origins as Inter-Services Intelligence began to influence them for reasons of Pakistani government interest.
Mullahs had not been local leaders, in contrast to khan, or to maliks, or tribal leaders. Indeed, there were many jokes about greedy or ignorant mullahs.  The Taliban gave authority to mullahs, filling a vacuum. Syed had become less important with detribalization and urbanization. Islamic knowledge had also been undermined by kings and Communists. Traditional mullahs were community servants. 
Iraqi Shi'ites, have long had religious schools, but obviously not based in Sunni Wahhabism. They first appeared in the Shi'ite holy cities of Karbala, Kadhimaym, Najaf and Samarra, in the eighteenth century. Najaf, in particular, also gained the reputation of being Arab rather than Persian Shi'ite. In the Ottoman provinces that made up modern Iraq, they also served as an alternative to Sunni madrassas.
Madrassas and terrorism
A "supply side" analysis, however, challenges the assumption a critical source of terrorists. The individuals involved in sophisticated attacks, which required language skill to penetrate areas outside Pakistan, or mathematical skills to work with explosives such as the 1993 World Trade Center bombing, the 1998 bombings of U.S. Embassies in Africa, the 9-11 Attack, the 2002 Bali nightclub bombings, and the July 2005 London bombings, were university-educated. 
- C. Christine Fair (July 2007), "Militant Recruitment in Pakistan: A New Look at the Militancy-Madrasah Connection", Asia Policy: 107–134,p. 108
- Saleem Ali (18 March 2009), Pakistan’s Madrassahs and Extremism: Is there a Connection?, A Foreign Policy (magazine), Brookings Institution Doha Center and Saban enter for Middle East Policy Event
- Richard F. Nyrop and Donald M. Seekins, ed. (January 1986), Religion, Afghanistan Country Study, Foreign Area Studies, The American University
- Hassan Abbas (2005), Pakistan's Drift into Extremism: Allah, the Army, and America's War on Terror, M.E. Sharpe, ISBN 0765614979, pp. 3-4
- Ministry of Education (1 August 2009), National Education Policy 2009, Government of Pakistan, p. 9
- Kaiser Bengali et al. (2003), Social Development in Pakistan 2002-03: The State of Education, Social Policy and Development Center
- Fair, Asia Policy, p. 108
- Fair, Asia Policy, p. 112
- Fair, Asia Policy, p. 121-122
- C. Christine Fair (March 2006), Religious Education in Pakistan: A Trip Report, United States Institute for Peace
- Steve Coll (2004), Ghost Wars: the Secret History of the CIA, Afghanistan and bin Laden, from the Soviet Invasion to September 10, 2001, Penguin, pp. 280-283
- Michael Griffin (2001), Reaping the Whirlwhind: the Taliban Movement in Afghanistan, Pluto Press, ISBN 074531274-8, p. 55
- Afghanistan: The Forgotten Crisis- Update March - November, WRITENET, UN High Commissioner on Refugees, 1 December 1996
- "Analysis: Madrassa", Frontline, Public Broadcasting Service
- Larry P. Goodson (2001), Afghanistan's Endless War: State Failure, Regional Politics and the Rise of the Taliban, University of Washington Press, ISBN 0295980508, pp. 17-18
- Griffin, pp. 58-59
- David Wurmser (1999), Tyranny's Ally: America's Failure to Defeat Saddam Hussein, American Enterprise Institute, ISBN 084474073X,pp. 77-78
- Bergen and Pandey, “The Madrasa Scapegoat”; Candland, “Religious Education and Violence in Pakistan;” Evans, “Understanding Madrasahs”; and Marc Sageman, Understanding Terror Networks (University of Pennsylvania Press, 2004), 61–98, quoted in Fair, Asia Policy, p. 116