bandgeek has a pretty good explanation. It's the idea that Christ is protecting his flock by giving the Pope the ability to say the right things when making official statements about faith and morals. The Church claims that these proclamations are "infallible," not that Church leaders are "indefectible" or can't make mistakes or don't sin.
The doctrine of infallibility has nothing to do with the brainpower, intuition, moral fibre, or even the faith of the Pope. Infallibility has everything to do with God protecting His Church and His teachings. Catholics see that Christ promised to guide and protect his Church and to send the Holy Spirit to lead it into all truth. (Mat 16:18-19, 18:18, 28:20; Jn 14:16, 25, 16:13). Even during medieval times when there were some questionable and even bad popes, God kept them silent on issues of faith and morals during their office.
at 4:23 PM on Sep. 6, 2009