As noted earlier (See the chapter “Does the Earth Revolve Around the Sun", Aristarchus of Samos proposed that the Earth revolved around the Sun, but the idea was rejected by later Greek astronomers, in particular Hipparchus. Ptolemy, living in Egypt in the 2nd century AD, expressed the consensus when he argued that all fixed stars were on some distant sphere which rotated around the Earth. Ptolemy tried to assemble and write down all that was known in his day about the heavens in “The Great Treatise," now known as the “Almagest," a corruption of its Arab name. (An annotated translation by G.J. Toomre was published in 1984 by Princeton University Press and is now available in paperback for $39.50. See p. 120, Nature vol. 397, 14 January 1999.)
To explain the motion of planets, Ptolemy used a theory which started with Hipparchus. Following the work of Aristarchus (See the chapter “Estimating the Distance to the Moon") and Hipparchus (See the chapter “Distance to the Moon, Part 2"), it was already accepted that the Moon moved around Earth. Ptolemy assumed that the Sun, planets and the distant stars (whatever those were) also moved around the Earth. To the Greeks, the circle represented perfection, and Ptolemy assumed Moon, Sun, and stars moved in circles too. Since the motion was not exactly uniform (later explained by Kepler's laws --- http://www.phy6.org/stargaze/Skeplaws.htm), he assumed that these circles were centered some distance away from the Earth.
While the Sun moved around Earth, Venus and Mercury obviously moved around it, on circles of their own, centered near the Sun. But what about Mars, Jupiter and Saturn? Cleverly, Ptolemy proposed that like Venus and Mercury, each of them also rotated around a point in the sky that orbited around Earth like the Sun, except that those points were empty. The backtracking of the planets now looked similar to the backtracking of Venus and Mercury. The center carrying each of those planets accounted for the planet's regular motion, but to this the planet's own motion around that center had to be added, and sometimes the sum of the two made the planet appear (for a while) to advance backwards.
This “explanation" left open the question what the planets, Sun, and Moon were, and why they displayed such strange motions. But worse, it was also inaccurate. As the positions of the planets were measured more and more accurately, additional corrections had to be introduced.
Yet Ptolemy's view of the solar system dominated European astronomy for over 1000 years. One reason was that astronomy almost stopped in its tracks during the decline and fall of the Roman Empire and during the “dark ages" that followed. The study of the heavens continued in the Arab world, under Arab rulers, but of all the achievements of Arab astronomers, the one which exerted the greatest influence was the preservation and translation of Ptolemy's books and thus of his erroneous views.