The first underlying cause of WWI was imperialism. That is where large superpower countries do into smaller countries. A good example is the Great Roman Empire that was taking over smaller countries for 2,214 years. Germany and Great Britain were the two power countries trying to establish control in Africa and Asia. Due to rebellions of the native people and interferences by each other and other countries, they were not entirely successful. This lack of cooperation between European countries in the attempt to govern and control weaker states so as to use their products for trade caused tension, and finally after it built up to a certain point, war was the only option left. Other countries were aware and getting nervous, which brings up the next cause the alliance systems.
The Alliance systems is where some large countries backed up smaller countries, which means if the small country go to war that the larger country would be forced to enter and help out. The triple alliance was formed with Germany, Turkey, and Austria. Then the Triple Entente was formed with England, France, and Russia. France and Austria were the two small Countries that had confrontations and had to look at some larger countries with a strong military to have their back.
Nationalism means being a strong supporter of the rights and interests of one's country
http://andreana6.blogspot.com/2010_10_01_archive.html
http://www.historyonthenet.com/WW1/causes.htm