One common thread in all of the Islamic terrorism in the last two decades, is the presence of Islamic radicals who studied in Pakistani madrassas (Islamic religious schools). There are thousands of these schools in Pakistan, but the ones that generate the most terrorism activity are those that were founded in the last three decades, with the help of Saudi Arabian charities and missionaries (preachers and teachers). The Saudis were pushing their distinctive, hard core, Wahabi form of Islam. Wahabism is intolerant of other religions (in Saudi Arabia, other religions are not allowed to worship openly, or have their own churches, and trying to convert a Moslem to another religion can get you beheaded). The Pakistanis originally (in the 1970s) thought that some more Islamic conservatism would solve their problems with lawlessness and corruption. That didn't work, as the Islamic radicals were also lawless and corrupt, and terribly intolerant as well. The Pakistanis have been trying to rein in the Islamic radicals for a decade now, but it's slow going. Many of the radical madrassas have been shut down, but thousands of graduates are still out there. That's because the madrassas accepted a lot of foreign students, and these men went home full of rage and intolerance.
Wahabism maintains that good Moslems must live like the prophet (simply and with great piety), and that everyone in the world should do so as well. Many Islamic radicals added their own twists, and this form of Islamic radicalism turned into a movement that depicted the West as the enemy of Islam that must be destroyed, and any Moslems who did not agree with the radicals, were not really Moslems at all.
Saudi Arabia, and many other Moslem nations, have tried to tame their radical madrassas, and all have had limited success. The Islamic radicals are still recognized as good, if somewhat misguided, believers, by most Moslems. A decade ago, most Moslems even approved of terror attacks on Western targets. Since September 11, 2001, and especially the al Qaeda campaign against Shias in Iraq (2004-7), most Moslems have changed their minds. Islamic radicals are no longer very popular, but many Islamic conservatives are still allowed to preach radicalism, and justification for attacks on "enemies of Islam." Thus while there are fewer radical madrassas out there, some survive, and so does a generation of graduates. Many have mellowed, or simply gotten a reality check (or been killed in the process). But thousands are still out there, ready to die, or convince others to, for the cause.