History of Talibans
To find out the history of Taliban's, first we should need to recall 1979 Soviet Invasion of Afghanistan.At that time USA and Soviet Union were two known rivals. Therefore USA wanted to push Soviet Union out of Afghanistan. In this way,USA used its Geological allys Saudi Arabia and Pakistan.
Who created Talibans
At that time USA and Saudi Arabia were close allys they decided to use Pakistan for completion of their plane.It was decided that USA and Saudi Arabia will provide money assistance to Pakistan to create Jahadis(formerly called, Now Talibans).In this way ISI was the main player thats role was to create Taliban's and push Soviet Union out of Afghanistan. After the Soviet defeat from the Taliban's in 1979. In 1996 Taliban's first government was created.
World Trade Center 9/11
When in 9 September 2001 world trade center was hit by the Terrorists in New York. In which More than 1000 people were died. USA got so furious that they decided to start a war against the Terrorists (Al-Qaeda). At that time they used Pakistan as a partner in war against Talibans.
Pakistan's Interests and USA
Pakistan had helped alot to Americans,by military assistance and also by allowing Nato supply to pass through Pakistan. In this way Taliban's government ended in 2002. After that USA got control of the Afghanistan and during all this time Pakistan was one of the biggest ally of USA.
Indian's influence in Afghanistan
When USA allowed Indians to invest and to increase their influence in Afghanistan. As we know Pakistan and India are two historical rivals. India uses Afghanistan soil against Pakistan by its intelligence agencies RAW. In this way Pakistan wanted to save their national interests. Hence, Pakistan uses Talibans against USA Army.In order to get India out of Afghanistan. As Pakistan's eastern border is with India and western with Afghanistan therefore they can't afford the two front war from India.
Talibans victory and Pakistan
When Pakistan seeks its interests in Talibans. They started supporting Talibans against USA. After 20 years long war and trillions of dollars loss over it, At last USA decided to end this war. But as they announced this. Talibans become more aggressive and they started capturing States after States of Afghanistan. At last they captured the Kabul on 15th of August 2021.