In 1914 central Europe had divided into a system of alliances. Germany were allies with Austria-Hungary and Italy, they named the alliance the Triple Entente, also France made an alliance with Russia. Britain weren't really allies with France or Russia but had 'understandings' with both Countries since 1904. The Triple Entente believed if there was a European War Britain would fight on the left-hand side of the French.
Fearing wars on the East and West, Germany came up with the Schlieffen plan, it was thought up by General Von Schlieffen who was known throughout Europe for his clever tactics. The aim of the Schlieffen plan was to knock France out of the war quickly by attacking through neutral Belgium and encircling Paris. Von Schlieffen believed Russia would take time mobilized it's forces and the plan would only succeed if that happened. Von Schlieffen also thought Britain wouldn't enter the war as they had no alliances with France or Russia, but Britain had a secret alliance with Belgium for over 100 years prior.
The Germans marched south west through Belgium, where the British made contact with them at Mons on the 23rd of August. The British briefly stopped the Germans, but the Germans called and reinforcements arrived and the British were forced to retreat. Half of the British Force stopped and fought at advancing Germans at Le Cateau on the 26th of August to give the other half a chance to get away safely. The British retreated for 200 miles and lasted for two weeks and ended when they got to the river Marne.
Over-stretched and exhausted the German forces were counter-attacked by the French with British support, who drove them back over the rivers Marne and Aisne. Eventually they stopped but both sides tried to outflank each other to the north in what became known an the 'race to the sea'. The Belgian city of Ypres was the final barrier between the Germans and the Channel ports. The allies were determined to hold it at all costs. The Germans launched their first attack on Ypres in an attempt to break through but were finally beaten by the old regular British army, they were crucially assisted by elements of the Indian army. The German attack died away and Ypres was saved. Both sides then settled down for the first winter of the war.