What causes the pill to fail besides human error?

Hi! I’m new to the pill and heard people have gotten pregnant on the pill even though they took it perfectly without missing a pill, taking another antibiotic and more so I was wondering, how can someone get pregnant on the pill if they take all the correct steps?