Papal infallibility is the belief that the Pope is incapable of error when speaking from his position of supreme apostolic authority in defining doctrine concerning faith or morals. This doesn’t mean the Pope is sinless (although plenty of Catholics do believe that). Rather, it means that his teaching is perfect whenever he speaks ex cathedra, or from the chair of St. Peter.
The doctrine was defined by the First Vatican Council, presided over by Pope Pius IX. Pius decreed the Immaculate Conception of Mary, the belief that Mary was without sin, even though Jesus said no one is good but God alone (Mark 10:18).
Now, Catholic apologists maintain that the Pope has spoken ex cathedra only one other time, when Pope Pius the XII decreed the assumption of Mary, that she was bodily taken up into heaven. But these are not the only occasions papal infallibility has been exercised.
The Second Vatican declared that even when the Pope is not speaking from the chair, “his supreme magisterium is acknowledged with reverence,” and his judgments “are sincerely adhered to, according to his manifest mind and will.”
The Roman Catholic Church believes the Pope’s word is as good as God’s word. It was such teaching that spurred protestant reformer William Tyndale to declare, “I defy the pope and all his laws!” Tyndale translated the Bible into English, so that all could read God’s word. The Roman Catholic Church had him burned at the stake.
Tyndale understood what the Pope doesn’t, that our only infallible authority is the Bible. All Scripture is breathed out by God (2 Timothy 3:16). Psalm 18:30 says God’s way is perfect, and the word of the Lord is without error, when we understand the text.