It’s a warm summer evening in ancient Greece. You stare up at the stars, noticing that they appear to move together across the sky, but there are a few pesky “wandering” stars that seem to have changed their positions since your last observations a few nights ago…
Thus began the scientific study of astronomy.
Plato hypothesized that all celestial bodies moved at constant rates in circular orbits around the Earth — a geocentric universe. The stars were attached to a huge, rotating “celestial sphere”. This agreed with observations that stars always remained in the same place relative to each other.† However, the retrograde motion of planets (i.e. they appeared to move backwards) threw a bit of a wrench into the works. Originally it was suggested that each planet simply orbited the Earth on a sphere of its own, much like the fixed stars did, but this model just didn’t match up with observations. Hipparchus fixed the problem temporarily by suggesting that each planet orbited on a deferent and also moved on an epicycle, but his model became more and more inaccurate as time went on. Ptolemy further complicated matters by moving Earth away from the exact center of the deferents and adding equants which the epicycles would orbit at a uniform speed…
He wasn’t right either, but his geocentric theory was accepted for nearly the next 2000 years without much complaint — whenever observations disagreed with the Ptolemaic model, the model was “fixed” by adding more circles in order to better match the data (it eventually required 80+ circles).
The Greek astronomer Aristarchus proposed a heliocentric universe at some point around 250 BC, but no one really supported him and heliocentrism was basically consigned to the junkyard of scientific ideas until Nicolaus Copernicus came along in the 1500s. Annoyed by the complexity of the Ptolemaic model and all its circles, Copernicus suggested that a heliocentric model would make everything much less complicated. In the Copernican model, all the planets orbited the Sun in perfect circles — while this model explained many old problems (including retrograde motion), it too had to use epicycles to make theory agree with actual observations. Copernicus knew that his theory disagreed with the geocentric teachings of the powerful Catholic Church, so he waited until the end of his life to formally publish his findings in a book titled Revolutions.
Nearly a century later, Galileo published Dialogue, which compared the geocentric and heliocentric models in a mock philosophical debate, with heliocentrism undoubtedly coming out on top. The Catholic Church was understandably ticked off at Galileo for publishing this (and he had already published other works contradicting Church teachings), so they convicted him of heresy and sentenced him to house arrest to shut him up. Around the same time, Johannes Kepler used data collected by Tycho Brahe to formulate his three Laws of Planetary Motion, which really did make everything MUCH simpler. However, one casualty of Kepler’s Laws was the idea that planets orbited in perfect circles — instead, he discovered that they revolved around the sun in ellipses. How revolutionary!
† We now know that’s exactly not true, because stars move through space more or less independently of each other, but the effect wouldn’t have been noticeable to the Ancient Greeks.
TL;DR — The Greeks proposed a geocentric model of the universe based on what they observed, and basically everyone agreed with geocentrism until the model became ridiculously complicated in order to fit the data. Copernicus found that heliocentrism was a much more elegant solution; other scientists like Galileo and Kepler supported the Copernican Model in both their writings and their work.