Several of the ancient Greek philosophers (c.400 BC - c.300 BC) attempted to explain the motions of the Sun, Moon, planets and fixed stars in terms of a system of spheres centered on the Earth.
The first of these models was proposed by Eudoxus. Using 27 spheres (3 for the Sun, 3 for the Moon, 4 for each of the known planets and 1 for the fixed stars), Eudoxus was able to account for the daily motions of the celestial objects including the retrograde motion of the planets. The predicted motions were not very accurate, particularly for Mars and Venus, but they were adequate for Jupiter and Saturn. Eudoxus' model could also not account for the observed variations in the brightness of the planets.
Callipus extended the number of spheres by 7, one each for Mercury, Venus and Mars, and two each for the Sun and Moon. These new spheres improved the accuracy of the planetary orbits to a level where they were as good as the available observations! Callippus was also able to account for the varying speed of the Sun throughout the year.
The next major contribution to the homocentric model was by Aristotle, who discarded several of the spheres in the earlier models, but added his own so that the final total was 55. These new spaces were placed between the planetary spheres, and acted to 'unwind' the motions of the other spheres. Despite all of this work, his model still did not account for planetary brightness variations.
It is not known whether Eudoxus and Callippus saw the spheres as real objects, or just handy calculating devices, but to Aristotle they were physically real - composed of quintessence (the fifth 'element').
Aristotle's homocentric sphere model was still taught until the Middle Ages (in a much-simplified way that did away with most of the spheres), alongside the Ptolemaic system.