A strong tendency of totalitarianism has always been evident in the history of Russia. The same tendency has been carried over into the Soviet Union in the form of Marxism-Leninism. Stalins attempt on enforcing a common Soviet national identity on disparate ethnic groups has always been a source of unrest in the USSR. The Marxist-Leninist way of redefining communism from a state and nation building perspective has also made the internal socio-economic structure of the Soviet Union inherently unstable. Moreover the Soviet narrative on international communism once again emphasized the dominant hierarchy of Marxism-Leninism, as evidenced by the Hungarian uprising of 1956.
An inclination towards collectivization as a State building principle has also rendered the Soviet economy distinctively vulnerable in comparison to Western nations. The Soviet Union was caught in a pincer movement of internal instability and external influences in terms of foreign policy. Gorbachevs introduction of reforms in terms of Glasnost and Perestroika hinted at a possible opening up of the Soviet society. The departure of Soviet troops from Afghanistan in 1989 resulted in a decreased military influence on the Soviet society.
This further encouraged the citizenry to question the legitimacy of Soviet identity culminating in the violent demonstrations across the Soviet Union, especially in the Baltic States. This exposed and brought the structural weakness of Communism to the surface. The fall of Berlin wall also contributed to the weakening of Soviet foreign influence. Economic factors like dip in the oil price and lack of foreign reserves further divided and weakened the nation already disturbed by the civil unrest. Soviet Union was not only reeling under the pressure of internal conflicts, but also could not compete with United States in terms of military power and economic development.
Finally Soviet Union was forced to withdraw its troops from Eastern Europe and the communist regimes there were overthrown. The erstwhile Baltic Republics also declared independence in 1990. As a result the Soviet brand of communism shrunk itself and was limited to Russia. As a culmination Boris Yeltsin banned the CPSU in 1991 and termed it unconstitutional.
To summarize the fall and collapse of communism was not due to internal strife alone, but also hastened by the indirect economic influence by United States. The collapse was accelerated during 1989-91 due to a combination of these factors. The collapse itself has to be further understood within a broader framework of systemic weakness of the idealogy. At the same time short-term factors like lack of satisfactory economic growth and civil unrest did indeed play a crucial role in the sudden demise of Communism.
Friedman, L. Thomas. The World is Flat, England: Penguin Books Ltd., 2005. 48-172