See: Post Presidential political career for President Clinton, but to a lesser degree, as Obama probably won't be as popular.
He will write his memoirs, be a diplomatic troubleshooter, appear in some par5tisan campaigns in places where he is still popular... He has always been a horrible match for a big part of America.
When something happens to Clarence Thomas (who is overweight and black -- a bad actuarial combination for someone in his sixties), he could be the obvious choice for the Supreme Court.