Because of collective security (alliances made; i.e. Triple Alliance, Triple Entente), the 'local conflict' between Serbia and Austria-Hungary became a World War. Had it not been for this collective security, a World War could have possibly been avoided.
I don't think it could have been avoided. It was the result of a hundred little pressures all building up until eventually it just exploded. The countries of Europe all wanted a war they were pretty much itching for an excuse to fight and eventually they found one. None of them expected the war to be anything like what it became, they thought it would all be over quickly. If Austria-Hungary had negotiated seriously with Serbia in July 1914, war could have been avoided. However, Germany egged Austria-Hungary on to be completely unreasonable ... After the assassination in Sarajevo (28 June 1914, many politicians went on holiday as planned and seem not to have assumed they were on the verge of war. A Historian's Perspective From a modern historical and political science perspective, there are two major parts to this seemingly simple question: