The war ended in 1989 when the Soviet Union left Afghanistan after occupying it for almost 10 years, but it completely altered the fate of Afghanistan.
Civil War
Even after the USSR left, the civil war between the Afghanistan government and the mujahideen. They finally overthrew Najibullah by 1992, then instated the Taliban as the new government.
Civilians
As the restrictive laws were put in place by the communist government which prevented the free practice of Islam, which the majority of the population was. The fighting and destruction also scared the citizens of Afghanistan into Pakistan and Iran.
The Economy
The Civil War majorly depleted the government's economy.
Osama Bin Laden
During the war, Bin Laden joined the jihad and learned from the mujahideen, who were supported by the United States. Then, later he formed al Qaeda.