If a governor or senator is chosen as a running mate (VP) to a president candidate, and that candidate loses, do they go back to their post as governor or senator?
Nothing happens until the member resigns.
In 2008, for example, both candidates, Barack Obama and John McCain, were sitting U.S. Senators (incidentally, it was the first such time this ever happened).
- After the election, Barack Obama, the victor, constitutionally prohibited from holding both offices, resigned as Senator (causing Blagoveich to have 'F**n gold!'), and John McCain resumed his duties.
- Indeed, Obama scored some points off of McCain in October because of this. During the midst of the economic "meltdown," McCain thought it would score him some points to announce to the world that he was going to stop campaigning for a few days to return to the Senate, due to the seriousness of the event. He called on Obama to do the same - but Obama did not. Instead, Obama ridiculed McCain for "being unable to juggle" multiple hot button items. He claimed that as President, there wouldn't be the chance to let things cool down, insinuating that McCain would be an ineffective multi-tasker.
As a second example, Paul Ryan, in 2012, ran two campaigns. In the first, he ran for vice-president, in the second, as a Congressman from Wisconsin. He won the latter, but not the former.
About the only time this was an issue was in 1996, when the Senate Majority Leader, Bob Dole, decided he needed to tell people that he really, really wanted to be President. So, he resigned his Senate seat early in order to campaign. In the end, he lost the vote for the Presidency, and because he had resigned his seat, just had to go home.
Running for office has no bearing on your current office in any way. It's only if you win that adjustments need to be made.
Nothing happens. They don't "go back", they never leave. They're running the elections while continuing holding the job. Only if won, they resign from the previous position (sometimes not immediately, for example the current Lieutenant Governor of California stayed a couple of more days as the Mayor of San Francisco and had to be sworn in as Lt. Governor separately from Jerry Brown because of that).