A sitting President cannot be prosecuted criminally. He would have to be removed from office first.
Okay, first the President is impeached by the House,
and then tried by the Senate.
The only thing decided at that point is whether or not he's removed from office.
Criminal prosecution is a completely separate matter.
Gerald Ford established a precedent by giving a blanket pardon to Nixon.
Theoretically, a President could give himself a blanket pardon
before he is removed from office.