An alliance is essentially an agreement between two or more countries and it can be based on economical, political, or military reasons. Although it had not been proven as the sole cause of WWI, the alliances formed between the countries involved in WWI were really important.
This is because it turned a small conflict into a huge mess which could possibly been avoided if the alliances did not exist. More often than not, these agreements contained a clause which required the direct involvement of the signatory nations if one of the countries in the alliance is attacked. Thus, what started out as a war between two countries can set off a chain reaction of attacks that involve up to 6 countries, much like dominos when they fall.
The chain reaction is depicted in my picture through the use of books as I did not have real domino blocks on hand. The two main alliances formed during the First World War was the Triple Alliance (Germany, Austria-Hungary, & Italy) and the Triple Entente (Britain, Russia, & France). The Triple Entente in particular was incredibly significant because it shows that the three countries involved (Britain, Russia, & France) were willing to work together to face a common evil although they had some tension and bad blood among each other previously.
The formulation of these alliances are often very private and is only revealed to the public once everything is agreed upon. As everything is done in a closed-setting, some nations would even negotiate with other countries without informing their partners. This happened to the Triple Alliance with Italy betraying the rest of her alliance partners. By 1914, Italy was only a nominal member of the Triple Alliance because it had a relatively weak military as it was newly formed. Hence, the other stronger countries did not pay much attention to Italy which was mistake on their part. Thus, Italy grabbed on to this opportunity to collude with France. She promised to stay neutral and not interfere if France launched an attack on Germany.
So, when the war broke out, she stayed out of it, leaving Austria-Hungary as the sole alliance partner for Germany.