Here we learn that Gibeon was a great city and full of mighty men, yet they had made peace with Israel since they feared for their lives! Initially the Canaanite peoples had planned to join together to defeat Israel, but now they redirect their focus toward the Gibeonites. They first want to vengefully destroy Gibeon for making peace with Israel.
"And the men of Gibeon sent to Joshua at the camp at Gilgal, saying, 'Do not forsake your servants; come up to us quickly, save us and help us, for all the kings of the Amorites who dwell in the mountains have gathered together against us'" (10:6). The Gibeonites know they cannot survive without help, and they plead with Israel not to forsake them (i.e., their servants).
"So Joshua ascended from Gilgal, he and all the people of war with him, and all the mighty men of valor. And the LORD said to Joshua, 'Do not fear them, for I have delivered them into your hand; not a man of them shall stand before you.' Joshua therefore came upon them suddenly, having marched all night from Gilgal. So the LORD routed them before Israel, killed them with a great slaughter at Gibeon, chased them along the road that goes to Beth Horon, and struck them down as far as Azekah and Makkedah. And it happened, as they fled before Israel and were on the descent of Beth Horon, that the LORD cast down large hailstones from heaven on them as far as Azekah, and they died. There were more who died from the hailstones than the children of Israel killed with the sword" (10:7-11).
Joshua quickly responds to the cry for help and marches the Israelite army all night to Gibeon. God removes any doubt in their minds by affirming that they will be successful. The Canaanites, who were intent on destroying Gibeon, were likely not expecting Israel's arrival and attack upon them. They quickly retreated but were slaughtered by both the sword and large hailstones the LORD directed against them (cf. Job 38:22,23). The Canaanites had no hope of success for they were fighting against God!
"Then Joshua spoke to the LORD in the day when the LORD delivered up the Amorites before the children of Israel, and he said in the sight of Israel: 'Sun, stand still over Gibeon; and Moon, in the valley Aijalon.' So the sun stood still, and the moon stopped, till the people had revenge upon their enemies" (10:12,13). Clearly, Joshua wanted more time to completely vanquish the enemy. He didn't want them to escape once the sun went down. So, he prays for a miracle, and he receives it!
"So the sun stood still in the midst of the heaven, and did not hasten to go down for about a whole day. And there has been no day like that, before or after it, that the LORD heeded the voice of a man; for the LORD fought for Israel" (10:13,14). Skeptics point to this passage and say: "That's impossible!" They then speak to the catastrophic problems they claim would have resulted if God did stop the Earth from rotating for a day. Thus, they contend that the passage must be understood figuratively. They might assert something ridiculous like this example: "The battle was so large that the Israelites believed it had to take more than one day to win it, and it just felt to them like it must have taken more than one day." Some spend lots of time trying to explain away the miracles the Bible records in so many places. I see no need to do such. I do not claim to know exactly what happened over Gibeon during that period, but I believe God made it possible supernaturally. Did God slow down the setting of the sun (i.e., the rotation of the Earth)? Did He stop all celestial movement in the Universe for a day? Did He merely refract the light of the sun into that area for a long period of time while the rest of the Earth continued as usual? No one knows and that's just fine. We don't need to know (cf. Deut. 29:29). Joshua prayed for divine assistance and he received it! Almighty God who created the Universe and everything within it, could certainly extend the sunlight for a battle in any way He desired. Nothing is too hard for Him!
As a side note, don't fall victim to foolishness that purports to support the Bible. There has been a story circulating for years about NASA computers finding a missing day while making astronomical calculations. It's not true, friends. The story is pure fiction. To repeat such as truth only destroys one's credibility. We don't need made-up science to validate the truth of God's word!