Between the years of 1989 and 1991 the warsaw pact began to negate communism. This led to communism beginning to collapse in almost all the communist countries in europe and the Soviet union. It was like a series of dominos one regime fell and the next one and so one because in june 1989 the wall of berlin collapsed and west germany and east germany were united after years of separation.
Then after that same year Czechoslovakia resigned to the communism regime and a bit later a revolution was occurred kicking out the ruler of Romania, followed by the bulgarians in 1990-91. Mikhail Gorbachev was a big influence on this collapse because he changed his policies that made the soviet union stronger while he really didn't care much about other and communism. So when this happened other countries just got "attacked" and were switched to democratic/ capitalist countries.