Praise be to Allah.
The scholars are unanimously agreed that the earth is round, but to human eyes it appears to be flat, because it is very big and its roundness or curvature cannot be seen at close distances. So the one who stands and looks sees it as flat, but when viewed as a whole, in reality it is round.
Ibn Hazm (may Allah have mercy on him) said:
The proofs of the Qur’an and Sunnah indicate that it is round. End quote.
The verse (interpretation of the meaning) “And Allah has made for you the earth wide spread (an expanse)” [Nooh 71:19] indicates that it is spread out and shaped so that people can feel settled in it and be able to live and prosper in it. Ibn Katheer said:
That is, He spread it out, prepared it, made it stable and made it firm by means of the mountains.
Tafseer Ibn Katheer, 8/247
Similarly, the verse (interpretation of the meaning) “Have We not made the earth as a bed” [an-Naba’ 78:6] means that it is spread out and prepared for you and for your benefit, so that you can cultivate it, build dwellings in it and travel through it.
Ibn Katheer said:
That is, it is prepared for people in such a way that they can live in it, and it is firm, stable and steady.
Tafseer Ibn Katheer, 8/307
And the verse (interpretation of the meaning) “And the earth We spread out, and placed therein firm mountains, and caused to grow therein all kinds of things in due proportion” [al-Hijr 15:19] means We spread it out and placed firm mountains therein. This is like the verse in which Allah says (interpretation of the meaning): “And it is He Who spread out the earth, and placed therein firm mountains and rivers” [ar-Ra‘d 13:3].
There is no contradiction between saying that it is round and saying that it was spread out, because in fact in its totality it is round, but to the one who stands on it and looks at it, it appears flat, as it appears to everyone.
Ar-Raazi (may Allah have mercy on him) said:
If it is said: Do the words “And the earth We spread out” indicate that it is flat?
We would respond: Yes, because the earth, even though it is round, is an enormous sphere, and each little part of this enormous sphere, when it is looked at, appears to be flat. As that is the case, this will dispel what they mentioned of confusion. The evidence for that is the verse in which Allah, may He be exalted, says (interpretation of the meaning): “And the mountains as pegs” [an-Naba’ 78:7]. He called them awtaad (pegs) even though these mountains may have large flat surfaces. And the same is true in this case.
End quote from Tafseer ar-Raazi, 19/131
Shaykh ash-Shanqeeti (may Allah have mercy on him) said:
If the scholars of Islam affirm that the earth is round, then what would they say about the verse in which Allah, may He be exalted, says (interpretation of the meaning):
“Do they not look at the camels, how they are created?
And at the heaven, how it is raised?
And at the mountains, how they are rooted and fixed firm?
And at the earth, how it is spread out?”
Their response will be the same as their response concerning the verse in which Allah, may He be exalted, says (interpretation of the meaning): “Until, when he reached the setting place of the sun, he found it setting in a spring of black muddy (or hot) water” [al-Kahf 18:86] – that is, as it appears to be in the eye of the beholder, because the sun sets on one country, but remains up in the sky for another, until it rises from the east on the following morning. So the earth looks flat in every region or part of it, because of its immense size.
This does not contradict its real shape, because we may see a very high mountain, but if we climb it and reach its summit we may find a flat surface there, and find an entire nation living there, and some of the people there may not know anything about the rest of the world, and so on. End quote.
Adwa’ al-Bayaan, 8/428
Shaykh Rafee‘ ad-Deen ibn Waliyullah ad-Dahlawi (may Allah have mercy on him) said in his book at-Takmeel:
Some may understand words such as “made the earth as a bed” [an-Naba’ 78:6], “He spread the earth” [an-Naazi‘aat 79:30] and “…how it is spread out…” [al-Ghaashiyah 88: 20] as meaning that it is flat, whereas the scholars affirm that it is round on the basis of sound evidence, so it is thought that there is a conflict. That may be refuted by the fact that the visible part of it (for a person standing on it) appears flat, because the larger a circle is, the more spread out it is, so we may say that it is flat on the basis of that part of it that is visible to us, and it is round in its totality, on the basis of rational thinking.
Quoted from him by Siddeeq Hasan Khan in his tafseer, Fath al-Bayaan, 15/208
And Allah knows best.