Traditionally, wars are an expression of economic surplus. In the developed countries, this has been replaced by welfare.
Wars bring out the best and worst in human beings. Wars usually result in destruction of infrastructure, of personal property, and the rape, torture and deaths of innocent people. However there are worse things than war. Given the choice of war or enslavement most will choose war. Choosing to go to war to defend yourself, your family or your fellow countrymen from enslavement is not considered an evil thing by rational people.
Aggressors though, start wars for other reasons.
Often though it is in the interest of the population themselves to start a war. Suppose they run a small risk in order to loot a neighboring country. Losing a 1000th of your population to double your resources is a logical thing if most of you are close to the point of starvation. The chance of dying in such a war is less than the risk of starvation if you don't, and starvation is very unlikely with twice the resources.
Overpopulation is a great motivator for war. Many countries in the world are controlling their population (most of these voluntarily), and will continue to have a high level of resources per person. Other countries are growing quickly, and their resources per person is dropping rapidly. As the gap widens, the motivation for war increases. As the population increases, the wealth per head decreases, but in fact the economy grows, as does the total infrastructure, increasing the ability to wage war.
Only the future will reveal the balance between these. Some believe that overpopulation will create such hardship that the entire population will spend all their energy just eating. If this is the case, then the under-populated nations will keep their resources, otherwise the toppling of these nations is inevitable.
In fact the coming population explosion will make overpopulation inevitable in all countries which don't exercise compulsory birth control or adopt near-total private property rights.
Wars destroy infrastructure. A single suicide bomber can destroy a building worth billions of dollars. If you are from a poor country with very little infrastructure then war cannot destroy very much - if the shack you live in is bombed, then you can quickly rebuild it from the rubble. If you are from a rich country with a great deal of infrastructure then war is much less attractive - your standard of living will go down considerably if your house and car are destroyed. As nations get richer they become more dependent on infrastructure. Their ability to wage war increases, but their desire to wage war decreases.
Many people believe that there is a infrastructural point at which which war is no longer in a nation's interest. If the vast majority of the nation's wealth is in infrastructure (which is likely to be destroyed or very damaged in a war). Even a relatively small opponent can cause enough infrastructural damage to make the costs higher than the gains.
Unfortunately, between the many dictatorships in the world keeping their populations poor, and the ignorance of many people in keeping themselves poor, the world may never get to that point.
Ultimately, the desire to go to war is genetic, and many of the the answers like in Selfish Gene Theory. People's desire to procreate is insatiable. Genes which coded for the conquest of weaker neighbors caused their carriers to have more descendants. This is the fundamental reason for war - the desire to take more resources to increase reproductive potential.
The conclusion is that wars will always be fought by those who perceive that there is a gain for them, or for the size of their families. The best way to minimize wars is to understand the reasons for them. Wishing for peace believing in peace, or proclaiming the fundamental good of mankind is living in denial, which will cause wars - not prevent them.
The two main macroscopic factors which will affect wars in the future are: infrastructure and overpopulation.