Well, from what I understand, and I may be off here, but Germany had a mutual defense treaty with austria, and so when Ferdinand was assasinated by serbians, and austria declared war with serbia, germany went along with their pact to aid austria. Accepting that germany might have been intentionally escalating the issue.
Not exactly. Germany felt that the other European powers were intentionally trying to prevent it from becoming the superpower it could be, and to a certain extent they were correct. Britain would allow no-one to challenge their sea-power, France wanted to re-annex Alsace-Lorraine, and Russia was always keen to help itself to another serving of Poland. The Kaiser Wilhelm and the German General Staff had convinced themselves that a pre-emptive strike at Paris was their best avenue of self defense. Unfortunately, the decades old plan for this strike involved a vast wheeling front through Belgium, whose neutrality was guaranteed by international treaty. Paris and London would be obliged to defend Belgium in the event of a German invasion. The assassination of Archduke Ferdinand (ironically probably one of the most competent aristocratic leaders of the time) was viewed by the Hapsburgs as a prelude to a Serbian revolt, which could bring Czarist Russia into the fray. Germany took advantage of Russia's engagement in the East to open its own front in the West. Germany actually asked Belgium's permission to move its troops through its territory, but were denied. The logistics of the situation demanded that Germany proceed through Belgium anyway, though encountering resistance. Because civilians took up arms against the German troops, the Germans executed civilians as war criminals, in keeping to the letter of the Geneva Convention. This proved to be a mistake, as the mass executions were (justifiably) characterized as "atrocities." Britain was very slow to commit to the conflict. Had it not been for these "atrocities," they might well have backed out of their obligations.
Then the french, brittain, and others got tied into the war through their mutual protection agreements, and it all became a maelstrom of countries drawn in by treaties.
That's more or less accurate. The important take-away, however, is that France regained Alsace Lorraine (which it lost to Germany in the Franco-Prussian War decades earlier) and Germany lost a part of its Prussian territories to Poland. Although the Alsatians were quite happy to be French again, the German minority in the Polish territories were restive. The Nazis exploited this ethnic tension, fomenting riots and arming the populace to justify what would now be called a "humanitarian intervention." Most importantly, all of Germany's institutions were destroyed. The Imperial government, the Church, the Banking and financial sectors were gone or reduced to shells. New theories of political, social and economic organization emerged to replace the damaged machinery of society. Socialism, Bolshevism and Fascism each had their appeal. Fascism grew out of an attempt to create a truly "modern," efficient state. Unfortunately, under the cool rationality that it made it so effective in Italy, there was a hideous nightmare of irrationality in the German version, drawing on ancient pagan tradition, pseudo-science and medieval superstition. I'm neither defending nor attacking Germany and its people here, merely trying to lay out some perspective.