In the diplomatic tug of war that went on after the assassination of the Archduke, everything that could go wrong did go wrong. Many of the people at the top were unusually stupid, the Emperor of Germany, Kaiser Wilhelm II, being one. It is another terrible irony of history that this boastful, insecure, ignorant little man became German Emperor. His father, Frederick III, was everything Wilhelm II was not: pro-democracy, brilliant, well educated, a veteran of wars who had come to detest war and most important, a man who saw the terrible flaws in the Imperial German constitution and who was prepared to change them. He had cancer of the larynx and ruled only 99 days before his death.
At one of the most momentous meetings in the 20th Century, Imperial Germany's Crown Council of 5 July 1914 held in Potsdam with the Kaiser present, the Germans agreed to back up the Austrians in whatever military actions they took against anyone. This action by the German Government effectively gives the Austrians control over Germany's military and diplomatic policy. This calamitous decision is known in history as "the blank check."
The Austrians fill it out and cash it quickly. On 28 July 1914 the Austrians declare war on the Serbians. The cat is out of the bag and World War One begins and begins quickly, much of it driven by the complex mobilization plans of each nation. The Germans, allies of the Austrians, then declare war on the Russians (who back the Serbs). A few days later, the Germans also declare war on both the French, who are allies of the Russians, as well as the Belgians, who are allies of the French. This causes the British Empire, allied to the French and the Belgians, to declare war on the Germans. The the Austro-Hungarian Empire then declares war on Russia.
Serbia, if you remember, who is backed by Russia, declares war on the Germans, who are allies of the Austrians, whose declaration of war against Serbia started the whole damn thing. A few days later France and Great Britain declare war on the Austro-Hungarians. Remember that France and Great Britain are allied with the Russians, who are allied with the Serbians against the Austrians and the Germans. Toward the end of August, the Japanese, then allied with the British, declare war on the Germans and the Austrians. A few months after that, the Ottoman Empire comes into the war on the German/Austro-Hungarian side which prompts the British, French, Russians, and Serbs to declare war on the Ottoman Empire (which survives today in a very slimmed-downed country known as Turkey).
You will note the Kingdom of Italy isn't in the above list. Reason: the King and his ministers couldn't make up their minds about who would give them the best deal. This made the Germans and the Austrians very angry since they had a treaty of military alliance with Italy - the so-called Triple Alliance. The Italians said they had understood that treaty to be defensive not offensive. Since the Germans and Austrians started the war, it wasn't defensive hence Italy was under no obligation to observe the treaty. This was not how the Austrians and Germans understood the treaty.
[Image courtesy of Wikipedia.]