There's several moving parts to explore.
Swearing in
The President can take the oath of office anywhere. Lyndon Johnson was sworn in on Air Force One at Love Field in Dallas after JFK was pronounced dead.
Sentencing
It's unlikely a court would send a President-elect to jail. It's not unreasonable to assume a court would suspend the sentence to allow the sitting President to run the country. Eventually the convicted President would no longer be in office and could serve their sentence after their term ended.
More likely the President-elect will have been sentenced before the election if they are to be in jail during the election and/or sitting in jail come Jan 20.
Congress
The incoming President will also likely have a Congress that has a majority of their party in charge. Expect this Congress to pass resolutions calling for the freedom of the new President. Expect also There will be tremendous political pressure on whatever court has jurisdiction over the new President.
The Courts
As ohwilleke noted, it's unclear if a sitting President can issue a pardon on their own behalf. I am going to assume the answer is in the negative. Regardless, that question would have to be sorted out by courts later.
Most likely, there will be legal motions already filed with the relevant state and/or Federal courts, and these motions will focus narrowly on having the President released from prison solely for the sake of running the country. It's going to be a lot easier to get a President released from jail than it will be in trying to overturn the conviction.
As we've seen on other issues, issues related to the Presidency tend to get expedient hearings and/or action. Expect petitions for emergency hearings to be granted, especially if lower level courts deny the motions to release the new President.
The determined state
The worst case scenario here is you have a state-level conviction and that state has elected officials who are determined to keep the new President behind bars. As others have mentioned, the President cannot pardon state convictions, so if prosecutors and courts are aligned against the new President it would mean that the legal process would have to wind through state courts. They could keep a sitting President locked up (in theory) for the entire time by keeping the case tied up in state courts. Federal courts would be less likely to get involved as long as there were no clear legal problems, just lots of legal maneuvering.
It's not impossible that a state that determined to enforce their sentence keeps the President locked up for the entirety of their term.
Presidential Prison
The prison would have to make some accommodations for the President. After all, it would look bad for any prison to have a President injured or killed under their roof. It's not unreasonable to assume they would either house arrest the President, or put them in a minimum security facility. That would afford some room for the Secret Service to assign a detail to protect them.