Five kings from these cities (the Amorite coalition) decided to attack the Israelites. Then God gets involved.
God tells Joshua not to worry; he has given the Amorites into Joshua's hand, and they would just run away when they were attacked.
The LORD said unto Joshua, Fear them not: for I have delivered them into thine hand; there shall not a man of them stand before thee. Joshua 10.8So Joshua attacked, but it was God who did most of the dirty work. He “discomfited them” and even “chased them along the way.”
The LORD discomfited them before Israel, and slew them with a great slaughter at Gibeon, and chased them along the way. 10.10But God was just getting started. He threw down from heaven giant hailstones and killed even more Amorite soldiers than the Israelite army.
The LORD cast down great stones from heaven upon them unto Azekah, and they died: they were more which died with hailstones than they whom the children of Israel slew with the sword. 10.11Then God made the sun and moon stop moving for 24 hours so that Joshua would have plenty of daylight to finish killing off the Amorites. (It was this verse, among others, that got Galileo in so much trouble. If God stopped the sun from moving, then the sun moves around the earth.)
Then spake Joshua to the LORD in the day when the LORD delivered up the Amorites ... Sun, stand thou still upon Gibeon; and thou, Moon, in the valley of Ajalon. And the sun stood still, and the moon stayed, until the people had avenged themselves upon their enemies. ... So the sun stood still in the midst of heaven, and hasted not to go down about a whole day. 10.12-13So in this killing, God got directly involved. He slaughtered people, "chased them along the way," cast down huge hailstones from heaven, and, at Joshua's request, he stopped the sun from moving for 24 hours. You just can't ask much more from a God than that.
Here's how the Bible puts it.
There was no day like that before it or after it, that the LORD hearkened unto the voice of a man: for the LORD fought for Israel. 10.14
(Since the Amorite coalition consisted of 5 cities, I put the number killed at 5000. 1000 for each city.)