Concise Bible Dictionary:

War is the natural consequence of sin being in the world, and men and nations coveting the possessions of others (James 4:1-31From whence come wars and fightings among you? come they not hence, even of your lusts that war in your members? 2Ye lust, and have not: ye kill, and desire to have, and cannot obtain: ye fight and war, yet ye have not, because ye ask not. 3Ye ask, and receive not, because ye ask amiss, that ye may consume it upon your lusts. (James 4:1‑3)). The principal wars recorded in scripture are, however, different: they are those of Israel in taking possession of Canaan for Jehovah as the Lord’s host, and in maintaining their position in His land, for which they had divine instruction. Their warfare is typical of the conflict of Christians against principalities, powers, and the rulers of the darkness of this world and against spiritual wickedness in the heavenlies (Eph. 6:1212For we wrestle not against flesh and blood, but against principalities, against powers, against the rulers of the darkness of this world, against spiritual wickedness in high places. (Ephesians 6:12)). There are also the wars against Israel, when God used other nations to punish them. But God always maintained His rights in His own people and in His own land.
There are still wars on the earth, for sin is here, and nation rises against nation; and when Israel is again in the land they will be persecuted by their enemies. The kings of the habitable world will be gathered at Armageddon to the battle of that great day of God the Almighty (Rev. 16:14, 1614For they are the spirits of devils, working miracles, which go forth unto the kings of the earth and of the whole world, to gather them to the battle of that great day of God Almighty. (Revelation 16:14)
16And he gathered them together into a place called in the Hebrew tongue Armageddon. (Revelation 16:16)
). The Lord must reign until He hath put all enemies under His feet. This will be followed by a time when they “shall learn war no more,” when warlike weapons will be beaten into agricultural instruments, and the Prince of Peace will reign over the whole earth.