The misinformed and anti-Catholic types will often bring up the Galileo Gallilei case as an example of the Church's "medieval mindset". Even many Catholics hold this view. But the truth of the Galileo trial is a lot different than pop culture would have us believe.
Up to the time of the great Polish astronomer, Nicolaus Copernicus, (1473-1543) it was universally accepted that the Sun moved about the earth (geocentrism). Galileo became convinced of Copernicus' arguments for a heliocentric cosmology and began formal arguments on the matter upon discovering that Jupiter's moons circled it.
Galileo was a good writer and won many converts to the heliocentric viewpoint. Among these were an organized group of sceptics who used Galileo's arguments to say that the Earth couldn't have stood still in the sky as recounted in the Book Of Joshua - therefore the Bible was in error.
Furthermore, Galileo was an abrasive man who wasn't content with just refuting the arguments of his geocentric opponents, he poured personal scorn on them.
Complicating the matter was the fact that the Lutherans were using the issue to say the Catholic Church was lax about the Bible. The matter came to a head in 1615 when Galileo was summmoned to appear before the Roman Inquisition. He was given a hearing and, after consultation with astronomers, was ordered by the Inquisition not to defend the heliocentric model as anything more than a theory. A proscription to which he agreed. However, before long he was at it again.
Soon after returning to Florence, Galileo began work on his book, "Dialogue on the Two Chief World Systems". A dialectic on heliocentrism. Three characters are found arguing the two views - two heliocentrists and one geocentrist. Not surprisingly the geocentrist is totally routed. Published in 1632, it caused a thunderstorm. Not least because the foolish geocentrist, "Simplicius" mouthed the same arguments as the Pope! Whether he intended the insult or not, it was very imprudent, and Urban VIII, who had previously defended Galileo, did not take it lightly.
Summoned to Rome once more, Galileo again recanted, saying that since his former trial in 1616, he had "never held the heliocentric theory". Naturally, this was greeted with disbelief. He was convicted of "breach of contract" for violating his 1616 agreement, and a secondary conviction of "vehement suspicion of heresy." But in point of fact, he was not tried for heresy. While they overstepped their authority, the officials of the Inquisition acted in accord with the legal conventions of the time. And though some witnesses appear to have brought false testimony against Galileo, it was not a rigged trial. In Arthur Koestler's opinion, "His [Galileo's] defense was so patently dishonesty he would have been convicted in any court of law."
Galileo was sentenced to life imprisonment - in the apartment of an official of the Inquisition. Three weeks later this was commuted to house arrest at the home of some well to do friends. Finally, he was returned to his home in Florence from which he departed this world in 1642. He was never tortured; and he never spent any time in a prison cell.
Finally, though it's mathematically preferable, the solar system has never been proven to be heliocentric. And with minor tweaking, geocentrism can be made to explain planetary motion just as well. But, as mathematician Bertrand Russell put it: "Logically, it makes no difference to say the Earth circles the Sun, or that the Sun circles the Earth."