At that time Joshua spoke to the LORD in the day when the LORD gave the Amorites over to the sons of Israel, and he said in the sight of Israel, “Sun, stand still at Gibeon, and moon, in the Valley of Aijalon.” And the sun stood still, and the moon stopped, until the nation took vengeance on their enemies. Is this not written in the Book of Jashar? The sun stopped in the midst of heaven and did not hurry to set for about a whole day.
Joshua 10:12-13 ESV
Astronomers tell us that the sun is the relative center of the solar system and that the planets all orbit the sun. The earth revolves on its axis approximately every 24 hours. From the perspective of us little people standing on the surface of the earth, it appears as if the sun rises from one horizon, crosses the sky, and descends to the opposite horizon.
Some argue that, in order for the sun to stand still in the sky as described in Joshua 10, it must be orbiting the earth and literally moving across the sky. This belief assumes that the Bible doesn't use phenomenological idioms to describe real events, that it only uses literal descriptions of celestial mechanics. If the Bible says "the sun stopped", it can only mean that the sun actually stopped moving, not that it stopped moving only from the perspective of the observer.
However, the Bible frequently uses phenomenological language, often in ways that are contradictory if all such statements were to be interpreted hyper-literally.
For example, in the Parable of the Sower in Matthew 13:6 and Mark 4:6, Yeshua said that the sun rose and scorched the seedlings (ηλιου δε ανατειλαντος εκαυματισθη). ἀνατέλλω literally means to rise up.
And he told them many things in parables, saying: "A sower went out to sow. And as he sowed, some seeds fell along the path, and the birds came and devoured them. Other seeds fell on rocky ground, where they did not have much soil, and immediately they sprang up, since they had no depth of soil, but when the sun rose they were scorched. And since they had no root, they withered away."
Matthew 13:3-6 ESV
On a flat-earth--a belief system which also relies no hyper-literal interpretation of selected biblical passages--the sun must circle above the earth at a more-or-less constant height. It never sinks below the earth. It just recedes into the distance in one direction and approaches from the distance in the other, creating an illusion of sinking below the horizon and rising up from the horizon. We know that the sun shines on some part of the earth every minute of the day, so if the sun actually went below the plane of the earth, the entire flat-earth model falls apart.
In a non-flatearth, heliocentric model of the universe based on hyper-literal interpretations of the biblical text, the sun also doesn't rise. It orbits in a circle, always directly overhead of somewhere on the earth's equator. If one ball always moves around another ball at an approximately constant distance, one never rises over the other. "Rising" is a meaningless concept in this arrangement. The ball that is the sun can only appear to rise from the perspective of a viewer who is on the surface of the ball that is the earth.
In order to accommodate the sun standing still in Joshua 10 and the sun rising in Matthew 13, one statement or the other or both must be a phenomenological idiom expressed from the viewpoint of the observer and not an objective description of celestial movement. But how is a Bible reader supposed to know when to interpret an apparent idiom as literal? He knows because he can tell which interpretation better fits his biases, but that's just dishonest. A more objective reader can see that heliocentrism based on denying that Joshua 10:13 uses phenomenological language is refuted by the use of phenomenological language in Matthew 13:6.
Both systems rely on inconsistent hermeneutics, interpreting one passage as metaphor and another as literal, depending on which suits the readers preferences rather than on which suits the original author's intent.
A better hermeneutic weighs the narrative's intent, observations of reality, characteristics of normal human speech, etc. It can be complicated at times, but the biblical text becomes much simpler when we recognize that it was inspired by God, but written by actual people for the benefit of actual people, and so it follows the speech and thought patterns of the actual people who lived at the time of its writing, not authors of math and astronomy text books of the 21st century.