Anaximander of Miletus (c.610-c.545 BC), a pre-Socratic philosopher, was a contemporary of Thales and was one of the first 'cosmologists' (i.e. one who attempted to explain the origin and form of the Universe). Anaximander was quite a productive philosopher as he made maps of the known world, offered explanations for the origin of the Sun, Moon and stars, and even performed simple experiments such as marking the solstices and equinoxes on sundials.
The cosmological model he proposed was a ring of fire surrounding the Earth, that was hidden from view except through vents. The stars were the light of this fire that could be seen through the openings. This model could also explain the phases of the Moon: its phase depended on how wide or narrow the vent covering was.
Anaximander described the Earth as rounded and circular with two plane surfaces (not necessarily a flat disk, more like a cylinder or 'stone pillar'), which was suspended freely in space. It stays where it is because it is equidistant from everything else in the Universe. Above the Earth were (in order) the other planets, the stars, the Moon and finally the Sun. The components of the Universe were supposed to have formed as rings that were shed from a fiery sphere that once surrounded the Earth.
Only one phrase remains from Anaximander's prose account 'On Nature', although copies of this work were probably available in Aristotle's time (4th century BC).