Ptolemy set the basis for the geocentric system in the antiquity, and it was widely accepted as true, mainly because the religious leaders thought that it accurately matches the basics of the Bible, and later the Koran. The Ptolemaic geocentric system was not accurate though, as it was putting the Earth as the center of the universe, with the sun, moon, stars, and other planets all orbiting around it.
It was not until the late Middle Ages when Copernicus created a theory that it is the sun that is the center of the universe not he Earth, unfortunately he did not had a proof. Galileo though made a new invention, the telescope, which helped him prove the theory of Copernicus, and was also an invention that was providing proof for it. His research and findings were suppressed by the church, but gradually they managed to get out in the public and show the world the truth. They were claiming that the sun is the center of the universe, and the Earth, the moon , and the other planets are orbiting around it. though it was also not totally accurate, still it was a significant step forward.