The war was caused by various alliances, plus a mania on the part of the French to regain territory lost in the Franco-Prussian War. France had alliances with the UK and Russia; Germany allied itself with the Austro-Hungarian Empire and Italy.
The immediate cause was the assassination of Archduke Franz Ferdinand of Austria-Hungary (heir to the throne) by a Serbian nationalist while visiting Sarajevo. The Empire demanded Serbia (a separate country) basically give up its sovereignty to them; Serbia refused. A-H gave them an ultimatum: give in to their demands or be invaded. Russia, considering themselves the protector of the Balkan countries, and egged on by France, threated Austria-Hungary with war if the invasion took place. A-H called on Germany to back them up. Eventually A-H declared war; Russia joined in, Germany backed up A-H, and France gleefully joined.
Britain tried to stay out of it, but when the Germans invaded Belgium, which the British wanted as a neutral territory (and was a potential staging area for an invasion), the UK joined in (famously characterized by the Germans as “going to war over a scrap of paper”).
The Germans used the Von Schlieffen plan, which called for a massive attack on France for a quick defeat, so they could move troops against the slow-mobilizing Russians (the French Plan, basically an invasion of Alsace and Lorraine, was called “Plan 17,” though not from outer space). The plan was a good one but failed for several reasons. The Russians mobilized faster than expected, the German right wing was weaker than called for in the plan, and the French discovered a break between the German armies and, mobilizing the taxis of Paris, moved troops to win the battle of the Marne. The war turned to trench warfare.
The Russian mobilized, but were badly defeated at Tannenburg and also went into trenches.
The war became one of stalemate. Massed attacks (the allies favorite tactics was a mass charge against machine guns) were useless. There were occasional successful tactics like Nivelle’s rolling barrages, but the Germans adapted to them quickly and they rarely worked twice.
The Italians turned on their alliance and joined France and Britain due to bribery. They fought a bunch of battles in the same spot in the Alps, winning a little ground each time until they lost badly at the same place. The Japanese joined the allies mainly to get hold of German territories in Asia.
There was fighting in many other areas of the world. Two major campaigns was that in Mesopotamia, where General Townsend, one of history’s great incompetents, captured Baghdad but was force to give it up. He retreated to the town of Kut, was surrounded, and did nothing but call for a relief column. Eventually, he surrendered all his men, after mismanaging everything he could.
There was also a theater in Kenya. The German general there waged a guerrilla war very successfully and keeping extra UK troops pinned down.
Various methods were tried to break the stalemate. Winston Churchill planned an invasion of the Gallipolli Peninsula in Turkey (a Central Power like Germany), with the idea that he could then move up the Balkans (evidently, he never looked at a map a realized there were mountains in the way). The invasion was botched, with false starts and bad decisions that allowed the Turks (led by the future Kemal Ataturk) to know exactly where the invasion was gong to be, and thus pin down the Allied forces on the beaches. The forces eventually retreated in the debacle.
Among the battles on the Western front – the Somme, Ypres, etc. – the most striking was Verdun. The Germans noticed that for every German soldier killed, two French soldiers died. They decided to attack at Verdun – a salient (peninsula-like section) on the lines and what was considered a quiet sector – and hope the French would send in troops so France could be bled white. The French fell for the bait. General De Castelneau of the general staff took one quick look at the battle – where the French were drawing back and the sensible thing would be to just shorten their line – and said that Verdun could be defended. He then sent General Philip Petain to do the job. Petain realized his position, but using the single road into the area (the rue sacree), he brought in reinforcements and weapons, while rotating out soldiers so they remained fresh. The battle raged for months and the Germans began to see that they were losing troops as fast as the French, so they called off the attacks.
Things stayed at stalemate until the US joined. There were several reasons. One was the German’s unrestricted submarine warfare, where they’d sink any ship, neutral or ally, that they found. The US complained and the Germans gave it up for a time. When they resumed it (and also due to the sinking of the Lusitania, which probably was carrying weapons, but otherwise was just a passenger ship), the US declared war. The US was also pissed over the Zimmerman telegram, a missive sent to the German ambassador in Mexico saying he should make that offer that if Mexico declared war on the US (and thus kept us out of Europe), Germany would make sure they’d get back the territory they lost in the Mexican War. While possibly a hoax, it enraged public opinion against the Germans.
Meanwhile, tired of the war, Russia underwent revolution twice, with Lenin eventually coming to power.
The entry of the US was the beginning of the end. Millions of fresh troops were joining on the allied side, while the Germans were tired after four years of war. Erich Ludendorf, who shared command with Paul von Hindenberg,* ordered a final offensive. When it failed, and the US troops started pushing the Germans back, Ludendorf said the hell with it and urged surrender.
US General of the Armies (the only one ever to hold that rank) John Pershing wanted to take the allies to parade in Berlin to show the Germans they were beaten, but the other allies were too tired of the whole thing to do it. That turned out to be a big mistake.
*Ludendorf was a brilliant tactician, but was filled with doubts. von Hindenberg was a noble, and unperturbed. Before a battle, Ludendorf would get hysterical, terrified his plan would fail and Hindenberg’s job seems to be to calm him down.