The causes of World War I all came to a head with the Assassination of Archduke Franz Ferdinand, and his wife Sofia in Sarajevo in August 1914. This single event set in motion a chain of events that eventually drew the entire continent of Europe into war. Archduke Ferdinand, the heir to the Austro-Hungarian throne, was assassinated by Serb nationalists. Serbia had only recently gained independence from Austria, and had sought assistance from Russia in that endeavour. Russia had initially promised to back Serbia but then reneged on the deal. Czar Nicholas II had resolved never to do that to his Slavic brothers again.
In the aftermath of the assassination, Austria made a series of demands that interfered with Serbian sovereignty. With a firm commitment of backing from Russia, Serbia rejected Austria's demands. Austria mobilized to invade Serbia and Russia mobilized to counter the invasion. Austria had an alliance with Germany. When Russia mobilized against Austria, Germany mobilized to counter Russia. When neither side backed down, Germany invaded Russia. Russia had a military alliance with France, so the invasion of Russia brought France into the war against Germany.
Germany achieved success early, it made a solid gain into Russia, and prevented Russia from invading Austria, allowing Austria to invade Serbia unimpeded. Germany then switched its Eastern campaign to a holding plan, and turned the majority of its forces against France. Instead of meeting the French head-on though, Germany went for an end-run around their Northern flank. This strategy required Germany to violate Belgian neutrality. Great Britain had a military alliance with Belgium so the violation of neutrality drew Great Britain into the war.
The Ottoman Empire (Turkey) wisely sought to remain neutral, but Turkish control of the Dardanelles and Bosporus straits meant they had to take sides. If they maintained a long tradition of closing the straits to military traffic, they would inevitably assist Germany and Austria, because the Russian Black Sea fleet would not be able to back up the French in the Mediterranean, forcing Britain to divert a portion of its Navy to the Mediterranean. Opening the straits to military traffic would have the opposite effect. Britain confiscated 2 paid-for destroyers from the Turks at the start of the war, and that pushed Turkey towards Germany and Austria. Fearing that the straits would remain closed, a British Cruiser and minesweeper were dispatched to force the straits open. The Cruiser was forced to retreat, and the minesweeper was sunk across the Dardanelles, and that sealed Turkey siding with Germany and Austria.
A US diplomat had compared the situation to a powder keg, "All it takes is a spark to set it off." It proved an apt description.