There were two main alliances in Europe before the beginning of World War I. These alliances became the nuclei of the two opposing sides in that war. The first of these alliances was known as the Triple Alliance. This was composed of Germany, Austria-Hungary, and Italy. This alliance was created in 1882. Once the war started, the alliance fell apart. The Italians refused to join the war when it started and then entered the war on the opposing side in 1915.
The other alliance before WWI was called the Triple Entente (an entente is an informal alliance between states). This alliance was composed of Britain, France, and Russia. The French and Russians had been allied against the Russians and the British joined their alliance in 1907 as it came to be more worried about Germany. This alliance stayed together until 1917, when the Bolshevik Revolution knocked Russia out of the war.