Since the 1870s, the confederated principalities of German, Hungarian, Italian, and Austrian peoples had united into the Kingdom of Italy, the Empire of Germany, and the Empire of Austria-Hungary. This had all been started by Napoleon III. These three nations formed something called the Triple Alliance. The Russian Empire was a direct adversary of the German Empire and the two vied for control and influence over Eastern Europe. France and the United Kingdom had substantial colonial empires with economic interests all over the world. In order to contain Germany's own colonial expansion, they formed an alliance with the Czar of Russia, forming the Triple Entante. Simply put--Germany had become too powerful and the power-brokers in Europe did not want more competition from such a military powerhouse. The declining Ottoman Empire was on the verge of collapse and France and Britain dreamed of controlling the Middle East before Germany could get in on it.
Like most wars, this one began under false pretenses. In 1914, the heir to the Austro-Hungarian throne was assassinated supposedly by a Serbian. Hungary wanted to conquer and annex Serbia, which Russia already controlled as one of its puppet client-states. When Austria-Hungary declared war on Serbia in preparation for invasion, the Russian Empire simply started mobilizing for war in the hope that Hungary would back down. Due to Russia's mobilization, the German Empire suddenly declared war on Russia as per the protocols of the Triple Alliance. This was overly-rash for Germany, but Germany obviously wanted to conquer some Russian territories. Austria-Hungary dutifully was forced to declare war on Russia as well. The German Kaiser, knowing that France and Russia were allies, foolishly declared war on France as well. So four of the six powers had declared war on one another. Italy and the UK had stayed out of it up to this point. Instead of invading France through the Upper Rhine salient, Germany chose to conquer neutral Belgium and use that country and a staging point for invasion of France. For ignoring Belgium's neutrality, the UK entered the war with plans to conquer Germany's African settlements.
At this point, World War I had begun like any other European war that had occured over that past 1,000 years--a lot of tit for tat and hopes of conquest. The problem was the weaponry was so advanced that this war would prove to be more costly than anyone had expected.