War in Pakistan was a fallout for Afghan invasion by the United States. That's why you didn't see large scale insurgency in Pakistan before 2001.
Pakistan's government---officially---sided with the United States instead of opposing Afghan invasion. This enraged a lot of people in Pakistan--especially many in tribal areas where the locals had blood relatives living in Afghanistan. Hence insurgency began. Demands were to act Islamically and help our Muslim brothers in Afghanistan in face of infidel aggression. U.S drone strikes in tribal regions and killing of innocent civilians (famous bombing of a school that killed hundred+ children.) further caused the situation to deteriorate. All this anger, frustration was exploited by enemy agencies---and a mass insurgency began in Pakistan which was well funded and backed by professional military agencies like Indian RAW etc. Weapons, training, and cash was provided in abundant. Local politics in Pakistan--corrupt/inept political leadership--and rising fundamentalism added fuel to the fire.
In 2007---the government had to bomb a Mosque (Google Red Mosque, Islamabad operation) in the country's capital due to the fanatic takeover of the Mosque and kidnappings by the fundamentalists hiding the mosque.
Post 2007 the volcano erupted in Pakistan. Killings, bomb blasts, attacks on government buildings/military, suicide bombings in markets, mass murders became routine. Almost 50,000 people died. 2008-2013 had the worst, most corrupt, and absolutely lethargic government in Pakistan. During this time, I remember, one minister said on national television "Everyone does corruption. When you why when we do it? Its our right. Others do it too"...Just imagine!! So under such government there was no chance to curb the bloody insurgency.
Fast forward--2013 elections brought somewhat less corrupt government. The military leadership changed and the legendary General Raheel Sharif (google him! May Allah bless his soul.) took over. And then everything changed.
General Raheel literally turned the war upside down. Military began operations in the heartlands of Pakistani terrorists' bases. In response, Taliban attacked and killed 150 children in a school in Peshawar (Google Peshawar massacre). This was it. Entire nation cried. Grown up people cried on television. Even fundamentalists declared this attack as attack on Islam...and act of "kuffar" (something that makes a person non-Muslim by default). After sadness and cries---came the anger. Unprecedented anger.
Military under General Raheel invaded North Waziristan (Pentagon of terrorists in Pakistan) and literally every last corner of terrorist presence. In the mountains, in valleys, in cities, you name it.
The war seems to be coming to an end now. The terrorist attacks have dropped significantly (Mashallah!)...their bases have been run over...their leadership is hiding in Afghanistan....and Pakistan's economy seems to recovering.
There are still attacks here and there. There is still ALOT of work needs to be done to bring angered Pakistanis into mainstream..provided ample opportunities for all people in the country...and to get rid of terrorist menace once for all. But now there's hope and Pakistan seems to be going in the right direction.
This was the brief synopsis of conflict in Pakistan post 2001.
We need your and everyone else's best wishes.