The 'trigger' or 'spark' was the assassination of Archduke Franz Ferdinand and his wife by the Serbian Black Hand terrorists in Sarajevo on June 28, 1914.
The real question is this: Why was this crisis not dealt with in a more conventional, much less destructive way? There had been several crises before in the decade before 1914 and those involving the major powers in Europe had been settled peacefully. So did something go wrong in the handling of the crisis, or did one or more of the countries involved exploit the situation to plunge Europe into war?
(The view that somehow Europe simply stumbled into World War 1 by accident is generally not accepted by historians). It is at this point that controversy begins.
Austrian Response to the Assassination
The Austrians delivered an ultimatum to Serbia that was almost guaranteed to be turned down by Serbia, but in the event Serbia accepted almost all the points. Austria then declared war on the grounds that it had not been accepted in its entirety. It has become fashionable (at high school level) to claim that the Austrians had been looking for an excuse to declare war because of lingering disputes between the two countries. It is probably more accurate to say that Austria was trying to clip Serbia's wings and deny it a coastline.