According to the description in the Gemara, the way the sun appears crossing the sky during the day is due to a physical pathway that exists across the sky. The raki’a – the sky, or “firmament” (see Bereshit 1:6-8) is a half circle above the ground reaching into the sky. The sun travels at the height of the raki’a or below it from east to west (from A to B in the linked diagram). Darkness takes place when the sun enters a halon – a “window” in the raki’a, where it cannot be seen until it comes out of the halon the next morning. The Gemara attempts to establish the “size” of the world based on an estimation of the distance a person can walk in a single day and a comparison between that and the distance the sun travels during daylight hours.
Already in the period of the Ge’onim (prior to the tenth century CE) the commentaries taught that these discussions in the Gemara are neither halakha, nor are they essential Jewish belief, as they are based on a particular perspective on the natural world that was considered scientific knowledge at that time. The Ge’onim further note, that since Jewish scholars have embraced the positions of the scientific world with regard to these types of questions, the discussion and descriptions that appear in our Gemara are not to be understood as literal truth.
It is important to note that at least some of the discussion here does not really relate to the physical world in which we live; rather it refers to a spiritual and perhaps mystical world. As such it should be noted that the Sages of the Talmud talk about gan eden – the Garden of Eden – and gehenom – Hell – as if they should be measured within the precincts of our physical world, even as it is clear that they exist in a different realm of reality.