I typed your question onto google, the following came out and is quite accurate:
Papal infallibility is a doctrine of the Catholic Church which states that the Pope, when speaking ex cathedra (from the chair of Peter) on matters of faith and morals, is preserved from error by the Holy Spirit. This means that the Pope, in his official capacity as the successor of Peter and the Vicar of Christ on Earth, is protected from making errors when teaching on matters of faith and morals that are binding for the entire Church.
The concept of papal infallibility is rooted in the belief that Jesus Christ bestowed upon Peter and his successors a special authority and guidance to ensure the integrity of the Church’s teachings. This authority is seen as a gift of the Holy Spirit, safeguarding the Church from doctrinal error.
The Catechism of the Catholic Church explains papal infallibility in paragraph 891, stating:
“The Roman Pontiff, head of the college of bishops, enjoys this infallibility in virtue of his office, when, as supreme pastor and teacher of all the faithful – who confirms his brethren in the faith – he proclaims by a definitive act a doctrine pertaining to faith or morals.”
This means that the Pope’s infallibility is not based on his personal abilities or knowledge but is a charism given to him by God for the benefit of the Church. It is important to note that papal infallibility is not an unlimited power but is restricted to specific circumstances and subject matter.
The Catechism further clarifies in paragraph 892 that papal infallibility is a charism that is “proper to the successors of Peter” and that it is exercised “in a solemn manner” when the Pope speaks ex cathedra. This means that the Pope must clearly indicate that he is making a definitive and binding statement on matters of faith and morals for the entire Church.
It is essential to understand that papal infallibility does not mean that the Pope is incapable of making mistakes in other areas of his life or that every statement he makes is infallible. The doctrine only applies to specific circumstances when the Pope speaks ex cathedra on matters of faith and morals.