It was started by the assassination of Archduke Ferdinand in Sarajevo, but most participating nations joined in because they had alliances with other nations that were initially involved. Many scholars contend that Germany had been arming and preparing for war for some time to further its own national interests and that this was a good excuse to put their plans into action. By any measure the war was a huge disaster for all involved. The killing power of the new war machines and implements on all sides led to huge numbers of casualties with very little to show for them.
The standard explanation for World War I usually mentions Imperialism, nationalism, militarism, alliances, and the assassination of the Archduke.
During the 19th century, European countries competed to divide Africa, the East Indies, and China. That is the Imperialism part.
Germany and Italy became nations instead of collections of provinces, more or less like France, Spain, and England had united in earlier centuries. That is the nationalism part.
They were all armed with new weapons made from stronger steel and aluminum, which included dreadnought battleships, airplanes, machine guns, artillery and railroads to move the armaments. That is the militarism part.
They were divided into two armed camps by treaties, which caused all to go to war when one went to war. That is the alliances part.
When Serbian revolutionaries assassinated an Austrian prince, the Austrians attacked Serbia, the Russians attacked Austria, the Germans attacked Russia, the French and the British attacked Germany for any of the above mentioned reasons.
Frankly, I think this is all basic bologna. I think they went to war because it had been a hundred years since the Napoleonic Wars, and no one was left alive who understood the horror of war.