The first World War became a general conflict because of the web of alliances among the countries of Europe. Initially there was a Triple Entente of France, Britain and Russia and a Triple Alliance between Germany, Austro-Hungary and Italy. Russia also had alliances with Serbia and other Balkan countries.
The assassination of archduke Ferdinand in Sarajevo caused the Austrians to declare war on the Serbians. The Serbians then called upon their allies the Russians to declare war on the Austrians, which they did. The Austrians called upon their allies the Germans who then declared war on the Russians. The Italians reneged on their alliance treaty. Meanwhile the French and British declared war against the Germans and Austrians.
So the initial setup was British, French, Serbs and Russians against the Austrians and Germans. Later, the Ottomans (Turks) joined the Germans because they would join any side the Russians weren't on. Ultimately other countries joined the Anglo-French alliance, including the Italians, the Japanese and the Americans. The Russians dropped out after the Revolution in 1917.