The name "Jugoslavija" (which is the native spelling) comes from the words "jug" and "Slaven", which mean "south" and "Slav". Combined, they mean "the country of south Slavs".
There were three countries called Yugoslavia in southeastern Europe in the 20th century, spreading over various territories usually around Serbia.
Perhaps their most redeeming feature, strictly historically speaking, was that they managed to go through all known political systems in just one century.
The origin of the name
Probably the first "official" mention of the term Yugoslav (as opposed to simply south Slav) was the forming of the group of advocates of a joint country of South Slavs, by politicians from Croatia and Bosnia and Herzegovina, which were then both in the Austro-Hungarian Monarchy.
On November 22, 1914, Ante Trumbić, Frano Supilo, Ivan Meštrović, Hinko Hinković and Franko Potočnjak from Croatia and Nikola Stojanović and Dušan Vasiljević from Bosnia and Herzegovina first met with with Pavle Popović, a representative of Nikola Pašić's Serbian government, on neutral ground in Florence, Italy, in an effort to coordinate their efforts towards building an independent state of western South Slavs. Lujo Vojnović was also present as an observer from the Kingdom of Montenegro.
The new "Yugoslav" cause was receiving an increasing amount of support: in the western states everyone was tired of Austria-Hungary and a union with the eastern states was probably seen as the best way to come out of the anomie caused by the Great War. Even the large ever-nostalgic, ever-patriotic diasporas started supporting the new idea. The Yugoslav Committee ("Jugoslavenski odbor") was officially formed on April 30th, 1915 in London, and the aforementioned politicians were its members.
The goals of the Yugoslav Committee were partly reached by the end of the first world war, when Austria-Hungary disintegrated, and the South Slavs organized into the State of Slovenes, Croats and Serbs. Frano Supilo died in 1917 after having left the Yugoslav Committee because he felt that the Serbian government motives weren't honest.
The first Yugoslavia
The country's name and government indeed had to be revamped to accomodate for the eastern neighbours: first into Kingdom of Serbs, Croats and Slovenes in 1918, and later into the Kingdom of Yugoslavia. This country included:
the Kingdom of Serbia
the Kingdom of Montenegro.
The monarchy was ruled by the Serb dynasty of Karađorđević. On Vidovdan 1921, a crucial change in the constitution was passed.
It made the country centralized (and the center was in Belgrade, Serbia) and completely rewrote the internal region borders in an effort to make Serbs the majority in as many regions as possible. The vote was boycotted by representatives from the Croatian Peasants Party, the Republican Party and the Socialdemocrat Party (i.e. almost all of them!), which formed a large part of the parliament but still not enough to actually void it.
Yugoslavia would become a rather militaristic country, preparing for war with its neighbours and actively supressing disobedience inside. The champion of the Croatian Peasants Party, Stjepan Radić was assassinated by Puniša Račić in the middle of a parliament session in 1928.
King Aleksandar later proclaimed an outright dictatorship on January 6th, 1929, the constitution was abolished, and the witchhunt on anyone and anything against the Serbian centralism officially began.
Apparently the Serbs weren't gentle to their southern neighbours, either, so the Macedonians organized in a revolutionary movement called VMRO. Aleksandar's brutal reign abruptly ended when he was assassinated by exiled Macedonian nationalists during his visit to Marseille in 1934.
It turned out that Aleksandar had no real heir to the throne (his son, Petar II, was underage), and the country decayed to the point when the royal commission joined the Axis, a military coup was organized to oust them, and the Axis forces rather quickly conquered the country in 1941. The relatively powerful military force in Yugoslavia was beheaded and rendered almost entirely ineffective. The royal family fled to London.
The world war could only fuel the growing blood feud between the South Slavs. The nationalist Serbs organized in the četnik movement, whereas the nationalist Croats did the same with the ustaša movement, both aimed basically at the extermination of the others. Under the auspices of Italian fascist and German Nazi troops, ustaše's tentative government commandeered most of the western part of old Yugoslavia which they ostentatiously called the "Independent State of Croatia", whereas most of the eastern parts were under direct jurisdiction of the invaders.
The region was flooded with various warring groups, but nevertheless, an anti-fascist movement was successfully organized, mostly by communists like Josip Broz Tito. These partizans fought a guerilla war against the Germans, Italians, ustašas and četniks (equal opportunity warfare ;-) and managed to preserve the "brotherhood and unity" among the nations (they used "bratstvo i jedinstvo" as one of the key slogans). At the end of the war, the outside aggressors and quislings were defeated with the help of the Soviet Red Army.
The second Yugoslavia
After the WWII, in 1945, a new Yugoslavia was formed on roughly the same territory. This Yugoslavia was established by the anti-fascist movement and ruled by the Communist Party, led by Tito. Initially it was called Federal People's Republic of Yugoslavia, but once a fully new constitution was proclaimed in 1963, it was Socialist Federal Republic of Yugoslavia. It included six Socialist Republics:
along with two Socialist Autonomous Regions:
This was not just another communist country, because Tito opposed Stalin's plans to merge with Bulgaria and subsequently with the USSR. That caused a conflict between the countries and a silent war between the secret services, but Tito managed to withstand the pressure from the USSR. He later also formed a movement of countries neither in NATO pact nor in Warsaw pact, composed mostly of third world countries.
Tito tried to eliminate all the disputes between the nations, especially the largest two, Serbs and Croats.
The western republics were able to maintain their old borders, and the Serbs had much less dominance, but still, some of the disputes were swept under the rug. Among other things, the language was forcefully unified into Serbo-Croatian and anything involving nationalism, in some cases even patriotism, was banned. The state capital was still Belgrade so most of the decisions were made there, and Vojvodina became a province of Serbia rather than a separate republic.
The unrest escalated on several occasions. One of the largest political crisis happened in 1971 when Croatian students took it out on the streets demanding more political rights for them and the other non-Serb nations. After a while the mini-mutiny was shut down, but one couldn't ignore the general sentiment, so in 1974 a new constitution was finally made, which was indeed more lax on these issues.
Tito died in 1980, and the republics formed a seven member presidency council to run Yugoslavia. Only a decade after his death, the country collapsed and disintegrated due to an economic and political crisis. Slobodan Milošević came to power in Serbia and tried to subdue all other republics. Notably, in the winter of 1988/1989, his supporters performed a de facto coup in Vojvodina and Kosovo and subsequently completely abolished their autonomies. The situation escalated when ethnic Albanians in Kosovo began strikes and demonstrations.
By 1990, the western republics Slovenia and Croatia decided to distance themselves from Serbia's policies. On the 14th Congress of the Communist Party held in January, 1990 in Belgrade, an irrepairable rift between the Slovenian and Serbian delegations resulted in the Slovenian delegation demonstratively withdrewing from the event, immediately followed by the Croats. All this turmoil in the Party coincided with the worldwide downfall of communism (the bringing down of the Berlin Wall), and this Yugoslavia was starting to look really shaky. The western republics held democratic elections shortly thereafter, and elected goverments that preferred secession.
Some attempts were still made to maintain Yugoslavia, but with Milošević's tight grip on the Army command and pursuit of policies that smelled more and more of Greater Serbia, even the more pro-Yugoslav republics such as Macedonia and Bosnia and Herzegovina decided that enough is enough. Referendums were held in the "disobedient" republics and the people overwhelmingly voted for independence.
Milošević then gradually initiated a series of rebellions and wars, trying to subdue each of the breakaway republics.
The third Yugoslavia
Milošević's armies, of course, weren't able to keep the old Yugoslavia together, so by 1992 Serbia and Montenegro proclaimed the Federal Republic of Yugoslavia, which included:
The other ex-Yugoslav republics weren't too happy with them using the old name, because this could have let Serbia and Montenegro claim complete possession of the assets the socialist Yugoslavia still had in foreign monetary institutions.
The ethnic Albanians in Kosovo were now even more opposed to staying under Milošević's control: they began active resistance to the Serbian police and army raids which quickly escalated into a guerilla war. Still, they were far outgunned and so the international community (led by NATO countries) decided to really intervene. NATO proceeded to bomb Serbia, and after 78 days, with most of the critical infrastructure destroyed, Milošević capitulated on June 10th, 1999. Kosovo has been an international protectorate ever since, and it is due to have a referendum on secession.
However, they were not the only ones discontent: after the wars in the west, the Montenegrins elected leadership that wasn't favourably inclined towards Milošević. They completely severed all unnecessary links between the two countries (Montenegro even used a different currency: the Deutschmark, unlike Serbia which used dinar) and there was a lot of interest in a referendum on whether to proclaim independence.
Slobodan Milošević was eventually voted off the government, but he wouldn't relinquish power peacefully, so the Serbian people had to make a revolution to oust him. He and most of his elite were eventually seized by the new authorities and indicted for abuse of power and financial malversations. However, these charges would have to wait because the war crimes tribunal for ex-Yugoslavia in The Hague wanted them for genocide, crimes against humanity, serious violations of the Geneva convention, and violations of customs of war.
The last Yugoslavia was, after years of insistence from the Montenegro, officially renamed to Serbia and Montenegro on February 4, 2003. As a compromise, they decided that two countries will each hold a referendum in three years time on whether to continue in the present confederation, or to part ways completely.
The old name will probably linger on for quite a while, though.
The ex-Yugoslav states are still negotiating the terms of succession in 2003.