Wars bewtween are fought for several reasons. These are pride, ignorance, and resources.
Pride is rarely the reason, more commonly what lights the fuse. One leader insults the other and two different peoples grow angry at each other, demonizing the other. So to protect their "honor" or some principle, they go to war.
Ignorance will ussually manifest itself as racism or nationalism or religious intolorance. One group of people (ussually the most powerful) have somehing else to gain and they give reasons, using this ignorance and intolorance to gain the support of the people to go to war, and so they do.
Wars over the need for resources are the most self explanatory. Two peoples both need a vital resource and there isn't enough to go around, so people fight over it.
To stop the need for the military, the people would have to be educated first and foremost. Also, globalization is slowing eating away at religious intolerance and racism (though not fast enough). Finnaly, resources would have to be made readily available for all nations, to the point where there is enough for everyone, and in the case of land there may never be enough.
There is also another use for the military, civil wars. This would be a huge obstacle as governments by nature want to stay in power. They would see a lack of a military as a weakness.
I also see the need for at least a small military to protect us from any unkown threats we may see in the future, but nothing like any country has now.