Benjamin Harrison defeated Grover Cleveland in 1888, after he served one presidential term. Cleveland then defeated him in 1892 when he ran again on the Democratic ticket. This makes him the only presidential candidate I know of to both win and lose a presidential election to the same person.
Presidential power at this time was not quite as concentrated as it is today, so it wasn't unusual to see ex- presidents jump back and forth between private life and politics. Today, it seems that if you've served as president, you can only go on speaking tours or make ceremonial appearances at public events as though you're American royalty.
Cleveland largely disappeared from the limelight after Harrison defeated him during the term that Harrison served and took a regular job at a law firm in New York for a couple years until he played the old "I have no choice but to run again" card when he saw what he felt were the ruinous effects on the economy of Harrison's policies. Harrison worked for a law firm as well after he was defeated by Cleveland. Today they would have certainly made a good living as professional pundits on Fox News or MSNBC, but at this time it seems they had to support themselves like regular people.
Politics at the upper levels didn't pay quite as well in the late 1800's as it does today. There was probably more graft and money changing hands at the lower/local levels, but the higher offices of president, senators and congressmen were expected to take a pay cut to serve in politics.
The millions of dollars that presidential candidates now have funneled to them both before and after presidential elections from super pacs and lobbyists make me almost nostalgic for the days when you had to buy your way into city council.