Yugoslavia officially went out of existence in 1991, but its collapse began long before that. In fact, we can argue that Yugoslavia collapsed because it had never really existed as a true unified country. Instead, it had been forced together and had never really cohered. It stayed together for decades through force and through the political skills of one man, Marshal Tito. When he died, there was nothing left to hold the “country” together.
Yugoslavia was created in the aftermath of WW I. There was some logic to its creation as most of its people were Slavs of some sort (the name Yugoslavia, means something like “land of the South Slavs). However, the various groups that were brought together in the new country had so many differences that the country was, in many ways, doomed from the beginning.
Yugoslavia brought together people of different languages, religions, and histories. For example, the Croats were Catholic while the Serbs were Orthodox Christians and many of the people of Bosnia were Muslim. The various peoples spoke similar languages, but Serbs and Bosnians wrote their languages in Cyrillic while Croats and Slovenes used the Roman alphabet. Historically, Croatia had been part of the Austria-Hungary while Serbia had been part of the Ottoman Empire. In all of these ways, and more, the people who were put together into the new country of Yugoslavia were very different (or at least felt very different) from one another.
Because of this, the country was never really unified. For example, its Serbian king was assassinated in 1934 by Croatian and Macedonian extremists. During WWII, the country was badly split. The Germans invaded and set up a puppet government in Croatia, which conducted massacres of Serbs and Jews. The different groups generally resisted the Germans separately, with Serbs trying to restore the monarchy while many of the other groups united as socialists under Tito’s leadership.
After WWII, Yugoslavia held together because of Tito’s strength. There were still ethnic rivalries, but Tito was politically astute enough, and had enough military power, to keep those rivalries in check. However, Tito died in 1980 and with him dead, there was no strong force keeping the country together.
From there, Yugoslavia began to collapse. The collapse was gradual for about a decade. Albanians in Kosovo began to demand that their province be given status on par with the other “constituent republics” that made up Yugoslavia. Conflict between them and the Serbs on this issue led to increased Serbian nationalism. This led the Serbs to want to strengthen the federal government (which had been made weak so as to allow the various regions to stay together). The other ethnic groups resisted the Serbs’ efforts. In 1990, the first democratic elections in the country’s history were won by nationalist parties in the various regions. This led to attempts to break away and become independent. Both Slovenia and Croatia declared independence in June of 1991. Soon after, war broke out in various regions. Typically, the wars were based on ethnicity. For example, there was war in Croatia between the government and Serbs living in Croatia who wanted to break away from that new country.
Thus, we can say Yugoslavia collapsed in 1991 through political crisis and then through war. We can say that it collapsed because it was a country that had too many different groups with too little to hold them together.
Yugoslavia was a country that should never have been a country. Meaning "Land of the South Slavs," Yugoslavia was formed by throwing together a bunch of different ethnic groups into one multi-ethnic state. There were also Croats, Slovenes, Serbs, Albanians, Bosnians, and so on. There were Roman Catholics, Eastern Orthodox, Muslims... It was one big melting pot, as there were many areas without a certain majority, but the ingredients didn't like each other and didn't taste good together (going with the metaphor :)) The Austrians and the Turks had also pitted each group against each other in order to control the area.
Yugoslavia was technically under the influence of the Soviets, however, its leader, Josep Tito (the Serbian Resistance leader against the Nazis) never joined the Warsaw Pact because he wanted to connect with other countries. At home, he was a strong-willed communist, but he wanted a more open relationship. After he died, Yugoslavia pretty much fell apart.
The northern parts in Yugoslavia followed a more Western/modern model, so they were more wealthy and had ties to industries. The southern parts of Yugoslavia were more agriculturally based, more similar to the East. Because of the way things were taxed, the people in the north resented giving money to the south.
The Yugoslav Civil War:
In 1991, Croatia and Slovenia declared independence from Yugoslavia. Both countries were in the north, and they hated that their wealth was going to the south. However, the Yugoslav government tried to prevent Croatia from splitting because of the Serbian population in Croatia (Slovenia it let go, because the area was mostly of Slovenes). This led to the Croatian War of Independence (1991-1995), with the Croats fighting the Yugoslavs, and within Croatia, the ethnic Serbs utilized guerrilla warfare as well. There was severe ethnic cleansing involved, and many were killed.
Meanwhile, in 1992, Bosnia-Herzegovina declared independence, since the majority of the Bosnian population was Muslim. This led to the Bosnian War (Bosnia vs. Yugoslavia). This was really messy, because the Croats were caught in the middle, and all three nations were fighting each other. There was heavy guerrilla warfare and heavy ethnic cleansing within each country. This lasted until 1998.
The Dayton (OH) Accords, led by NATO leaders, negotiated the end of the two wars, and recognized everybody's independence. The UN created IFOR (International Force) to enforce the agreement.
Then in 1999-2000, Kosovo, predominantly Muslim, wanted to join Albania. Serbia/Yugoslavia went in, and we have the Kosovo War. NATO got involved against Yugoslavia. Eventually this all got resolved and Yugoslavia dissolved.