When Britain entered World War I, it was primarily in reaction to Germany invading Belgium. Britain promised to defend Belgium in perpetuity under the Treaty of London, which it entered into in 1839. A secondary reason the country joined the war was too ensure that no European country became significantly larger or more powerful than the others.
Between the late 1800s and early 1900s, Britain enjoyed what some referred to as a "splendid isolation" from the rest of the continent. It enjoyed a large empire, thanks to its rule over India, and was focused primarily on guarding its trade routes between its own borders and India's.
However, the British kept a close eye on France and Russia, in particular. Both nations were angling for control over various international waterways that would have given each significantly greater geographic reach than it had at the time.
Until the beginning of the 20th century, Britain experienced a positive relationship with Germany. However, when Kaiser Wilhelm II assumed control of Germany, he built up his military forces, which began to tip the scales of power. When Germany invaded Belgium, the British had no choice but to act to keep up their end of the aforementioned treaty.