There are several causes of war. They often can be narrowed down to economic, political, and military factors.
Various economic factors often lead to war. In 1898, the United States wanted to become a world power. We wanted to control lands beyond our borders. This would help us economically by giving us more trade and access to resources. Thus, we went to war against Spain in 1898. We fought against the British in 1776, in part, because they were taxing us without our consent. Germany began preparing for World War II, in part, because of the economic depression they had. People were looking for a strong leader who would lead Germany out the depression.
Political factors may also lead to war. When countries are struggling because of economic issues, nationalistic issues, or the oppression of people, people look to change the government. Many Latin American countries were tired of being oppressed by the Spanish and fought for their independence. The Texans fought against Mexico because they felt their freedoms were being violated. The Italians and Germans both felt they had been wronged by the terms of the Versailles Treaty. Both Mussolini and Hitler viewed this as a slap in the face to Italian and German pride. They believed revenge was needed. The movement to overthrow Communist governments in the 1980s and the early 1990s was related to people being tired of not having freedoms, both economic and political. This led to conflict and revolution.
When countries begin to build up their military, this may lead to war. In the early 1900s, many countries built up their army and/or navy. There usually is a purpose for building up the military. Countries build up their military because they plan to use it or because they think they will be attacked by another country. This was one of the causes of World War I. There are many reasons why war occurs.