Well, it helps to be well educated, and attending an Ivy League or other tier one school helps.
Here's where the presidents of the last century earned degrees:
Obama: Columbia and Harvard
Bush Jr: Yale and Harvard
Clinton: Georgetown and Yale
Bush Sr: Yale
Ford: Michigan and Yale
Nixon: Whittier and Duke
Johnson: San Marcos
Eisenhower: West Point
Truman: No degree earned
Harding: Ohio Central
Wilson: Princeton and Johns Hopkins
Taft: Yale and University of Cincinnati
For the rest, and to see where people went, but didn't finish (and there's way more of that than I would have thought) check out this page on Wikipedia.
A couple of thoughts:
1. Anyone can be president, so long as they're bright, work hard, and go to the right schools.
2. Like it or not, we do have an elite in this country. If my son wanted to be president, I'd tell him he needs to have a degree from an Ivy League college, and it looks like Yale is the place to go.
Update: My brother commented below... aside from a gross mischaracterization about me, he appears to be correct. I'd listed Obama as a Yalie, but, indeed, he went to Harvard. I believe, if I've counted correctly, that brings Harvard and Yale to a dead-even draw.