
Michael O. answered 09/05/19
Veteran History Teacher
When dealing with World War I, it's important to separate the trigger from the background. The trigger was, of course, the assassination of Austrian Archduke Franz Ferdinand in Sarajevo, and Austria demanding that Serbia essentially give up its sovereignty under the pretext of an Austrian investigation.
The background was a series of alliances and rivalries that had been building in Europe for decades, many of them based on nationalism. The alliance between Serbia and Russia was based on nationalism, as Serbia was a Slavic nation, and Russia saw itself as the protector of all Slavs, including those under Austrian rule (which then included the modern Slavic nations of Croatia, Czechia, Slovakia, Slovenia, and part of Poland). France resented Germany over the loss of the territory of Alsace-Lorraine in the Franco-Prussian war in the 1870s. Germany, arguably the most powerful nation in Europe, resented the larger colonial empires of Britain and France, believing that such an empire was the right of any great European nation (even Portugal and the Netherlands had more valuable colonial possessions than Germany).
When Austria invaded Serbia, it triggered off a domino effect of alliances. In response to Russia declaring war on Austria, Germany declared war on Russia in support of Austria. France declared war on Germany in support of Russia. Germany activated their plan for war with France, known as the Schlieffen Plan, which called for invading Belgium to bypass French defenses. This brought in the British, who had guaranteed Belgium's sovereignty. It should be noted that the leaders of these countries would have been aware of the alliances. Germany's reaction to France declaring war was less "Oh, scheisse, we have to fight the French AND the Russians!" and more "Oh, we've been waiting for YEARS to implement this awesome plan to invade France! Let's go!"