Wars occur because leaders have the military means to begin them. The stronger your army the more likely you are to fight because you think you have a good chance of winning. We see the emergence of military blocs as states unit to defend their region. This often produces a counter bloc. NATO and the Warsaw Pact during the Cold War.
Some states go to the aid of others who are in trouble.
The Gulf War was the result of Iraq's invasion of Kuwait. Wars do not just happen between states. We also have civil wars. Often conflict arises between people of different ethnic origin who have been caught up in the drawing of state boundaries as part of a larger conflict. Yugoslavia is a recent example.