The answer is alliance system and the rise of militarism.
For alliance system, nations signed treaty with one another and promised that in case the other nations were attacked, they would help out each other by military means such as providing weapons and sending troops.
This caused the war scale to quickly expand to a world war, as when one nation is invaded, other nations would join in,enlarging the war scale.
The most significant examples are:
Triple Alliance, one of the earliest alliance system, initiated by Germany, the members are Italy, Austria-Hungary and Germany.
Triple Entente- Britain, France and Russia was provoked as she knew about Triple Alliance. To secure her own nation, Triple Entente is formed, and promised to help one another when a country is attacked.
For militarism,it is the belief of building strong arm force and weapons not only to secure their own nations but as a mean of gaining national glory as well.
For instance,Germany and Britain competed on building dreadnoughts. Conscription was also introduced in order to expand the arm force.
Hope it helps!