1. During Soviet invasion USA/SA/Pakistan help mujaheddin in various fields, Funds/Weaponry/Man power(foreign fighters) and land.
2. SA along with Riyals also was main recruiter for foreign fighters and here billionaire OBL find his way to get in Afghanistan, Rich OBL funded mujaheddin financially and beside that he plan to provide continuous manpower in shape of mujaheddin to fight with Soviet, he opens dozens of Madrasas in Afghanistan and Pakistan and students of that Madrasas called by name of Taliban.
3. During war with Soviet there were lot of mujaheddin groups but mostly were under command of Ahmad Shah Masoud and
He served as the military and political leader of the United Islamic Front (also known in the West as Northern Alliance) and other main commander was Mulla Mohammad Omar ( basically he was a preacher/cleric.
4. After withdrawal of Soviet from Afghanistan a civil war started in Afghanistan to hold the power, Ahmad Shah Masoud controlled Kabul and northern areas and southern Kunar Nuristan (Jalalabad?)
was other groups, to fight with ASM the OBL and company recalled Mullah Mohammad Omar( he went back to his village after withdrawal of Soviet and start his preaching activities)
Here is the rise of Taliban with new recruiter the students of Madrasas in command of Mullah Omar with few other veteran ex mujaheddin start a new wave of war against northern allies. The pakistani establishment helped new group Taliban as the majority was pashtoons and geographically it was in their interest.
Taliban push back Ahmad Shah Masoud and capture Kabul.
Ahmad Shah Masoud with strong holds in Northern parts give hard resistance to Taliban and were killed during a peace dialogue process which was held by OBL wishes, the rumor is also that establishment was behind his murder.
Well, USA withdraws his proxy war as soon Soviet defeat they help mujaheddin but creation of Taliban was a work of SA (OBL) with help of Pakistan government of that time.
TTP is totally a different story but for sure it's creation deeply routed with Taliban of Afghanistan.