I don't know exactly what AP is since I'm not in it...
IB, however, is a program for 11th and 12th graders in which you can choose to take your subjects Standard Level (easy) or Higher Level (freakishly hard). At the end of 12th grade, you're given an exam not by your school, but from the IB headquarters somewhere in Europe. If you pass, you get your IB Diploma, colleges are majorly impressed, some give college credit, et cetera.
3nodding Students can also choose not to take the IB program, in which case your exam is made by your teachers in school, and you only get a diploma from your high school, not a shiny pretty IB diploma.
xd