Typically, there are three ways:
1) Said "bad student" is, nevertheless, a genius and can bring up the school's average SAT & LSAT scores; (This is less likely at Columbia and Harvard than at other schools, and, in Obama's case, this is a flat impossibility)
2) Someone pays (A LOT) to have the student admitted (Again, this is not very likely in the case of either Columbia or Harvard.); OR,
3) Said student is a minority and their scores, grades, and other resume are slightly superior to those of other applicants of the same minority.
There's also the possibility that in Obama's case there is some even darker, more conspiratorial means ... who knows?
I would vote for 4) Influential and rich patrons, probably in the form of commies or arabs.