The final major alliances in Europe leading up to the First World War were The Triple Alliance, comprising Germany, Italy, and Austria-Hungary, and the Triple Entente, composed of Britain, France and Russia. Franz Ferdinand, (1863-1914) Archduke of Austria-Hungary and his wife Sophie (1868-1914) were assassinated in Serbia, which had been in opposition to Austria-Hungary's 1908 annexation Bosnia-Herzegovina, an area which abutted the Serbian border. Like pawns in a chess game, Austria-Hungary had been backed by Germany, while Serbia had been backed by Russia.
After the assassination in 1914, Austria-Hungary (still backed by Germany) imposed an ultimatum upon Serbia (still backed by Russia.) The Serbians proposed negotiations, but began troop mobilization, having been emboldened by their military victories during the First and Second Balkan Wars (1912-1913.) In response, Austria-Hungary severed diplomatic ties with Serbia, began its own troop mobilization, and declared war on Serbia by the end of July 1914. When Austria-Hungary then attacked, Russia began full troop mobilization. Germany, coming to the aid of its ally, then declared war on Russia on August 1st. T
The pawn wars were now over. Once these two major European Powers were at war, the Alliances came into play -- In order, Germany declared war on France, Britain declared war on Germany, Austria-Hungary declared war on Russia, Great Britain and France declared war on Austria-Hungary, and as a finishing note, Japan declared war on Germany (!) on August 23rd. Now all the major pieces of this European chess game finally came into direct conflict.
Military alliances are a double-edged sword. They exist to strengthen the security of each member of the alliance -- a process that works to the benefit of smaller, weaker countries confronted by the threat of attack or invasion by a neighboring larger country. The theory is that, by legally binding themselves together and presenting a united front to would-be aggressors, they deter aggression from occurring in the first place. Assuming the broader outline of such an alliance is known to all, including to potential adversaries, then the alliance can play a pivotal role in maintaining the peace. If the facts of the alliance commitments are a secret, however, and a potential adversary is ignorant of the commitments to come to each others' defense in the event of an attack, then the probability of a miscalculation resulting in a chain of events is greatly increased. Such was the case in Europe in the years leading up to the outbreak of full-scale war.
The flip-side to the alliance equation, then, is that, while it may deter aggression by providing a common, united front, should an attack occur anyway, the scale of the conflict is guaranteed to be larger. The positive side of an alliance -- strength in numbers -- is countered by the negative side: ensured participation in a war by all members of the alliance, thereby greatly increasing the scale of battle and the amount of destruction. World War I was the culmination of a protracted process of often secretive negotiations among European powers that ensured the maximum level of destruction should a spark light the fire, which occurred with the archduke's assassination.
Speaking in terms of the big picture, European alliances escalated war following the assassination because many countries had an obligation to go to war without being directly involved with the underlying issue (the assassination). Europe at the time was rather tumultuous to start, and the fact that these alliances were formed meant that Country B, if it was an ally of Country A, needed to jump to Country A’s defense when County A got in a dispute. This quickly escalates into war, as both sides of the original conflict call upon their allies, drawing in more participants and heightening tensions despite the original matter being something that could have potentially been handled on a much smaller scale.
The two major alliances prior to the war were the Triple Entente: France, Britain, Russia; and the Triple Alliance: Germany, Austria-Hungary, Italy. There were also a bunch of other smaller alliances that would come into play.
Prior to World War I, after the Crimean War, Austria-Hungary had what is called a multi-ethnic empire, in which most of the people were not of German or Hungarian descent. The biggest ethnic group was the Slavs, of which they occupied most of the eastern portion of the empire. One group within the Slavs were the Bosnian Serbs. Bosnia was part of the Austrian empire, while Serbia was not. The Serbs wanted to join with their independent country because of the widespread nationalistic movements during that period, specifically Pan-Slavicism.
Archduke Franz Ferdinand and his wife Sophie were visiting Sarajevo, where they were assassinated by a radical group called the Black Hand. This ticked off the Austrian government, since Franz Ferdinand was supposed to be the next emperor, and since they have been wanting to stick it to the Serbs for a long time, sent an ultimatum to the Serbian government. Russia, being the biggest of the Slavic nations, had previously declared itself protector of the Slavs, and since Serbia was Slavic, Russia immediately jumped to Serbia's assistance. Austria, pulling the weight of her alliance with Germany asked the kaiser to talk with the czar of Russia. Germany in a rash decision, declared war on Russia (since they were beginning to mobilize) and declared war on France at the same time (since it knew France was going to jump in - Franco-Prussian War, France lost terribly). Austria declared war on Serbia, so everyone already involved declared war on each other.
Britain wanted to stay out, because a war on the continent didn't really apply to them. However, the Germans instigated the Schlieffen Plan, which stated that they were going to tear through Belgium to quickly defeat the French before rushing east to face the Russians. Britain and Belgium had a previous agreement that Belgium would stay out of European affairs, and Britain would protect it (wool trade). Britain got ticked at the Germans, and because of her alliance with the Belgians, Britain declared war on Germany. Italy weighed her options and decided that it would make more sense to side with the French and Russians and British than it would with the Germans and Austrians, so Italy changed sides.