Catholics believe the Pope is infallible because Jesus gave the role of Pope the authority to make decisions for the Church when He first appointed Peter as head of the Church.
In Matthew 16:18, Jesus says to Peter, “And so I say to you, you are Peter, and upon this rock I will build my Church, and the gates of the netherworld shall not prevail against it.”
Jesus gives Peter a unique mission to preserve the purity and sanctity of the Holy Church. Since Jesus intended the Church to endure through the ages, Peter could not be the only head. Succession was necessary in order for the Church to prevail until Jesus comes again, and there has been an unbroken succession of popes from Peter to our current Pope, Benedict XVI.
This means that our current pope was ordained by a bishop who was ordained by a bishop who was ordained by a bishop who was ordained by a bishop (you get the idea) who was ordained by St. Peter. Peter, along with succeeding popes and bishops were and are given the authority to govern the Church, and provide teachings regarding faith and morals.
The word “infallible” does not mean that the pope is perfect. It also does not mean that the pope knows everything. Instead, infallibility only applies when the Pope speaks about solemn, official teachings on faith and morals, and he can’t ever change, add, or subtract Christian doctrine.
He only helps define or explain what we already believe, and he doesn’t do it on his own. The infallible teachings of the pope are the result of many years – sometimes hundreds of years – of consultation with the other bishops and theologians of the Church. He is, in effect, voicing the belief of the whole Church.