I Beg Your Pardon
The Trump administration is a boon to legal discussion. Independent prosecutors, immunity, subpoenas, stays and appeals are all routine topics of conversation. Pardons, which usually don't come up until the end of a presidential term, are in the news now.
Article II, Section 2 of the United State provides that the president "shall have power to grant reprieves and pardons for offenses against the United States, except in cases of impeachment." That means that the president can "forgive" a conviction (pardon) or shorten the sentence (commute) of a federal crime. Many states impart in their governors the power to pardon state convictions. The pardon power is also called executive clemency.
The president may pardon individuals at any time after the illegal act occurs. It could be prospective, which would prevent a prosecution. It could also be after a conviction, before or after sentencing, during or after the sentence is served. The presidential pardon is a relatively unchecked power. The legislature does not need to approve and cannot reverse a pardon. Courts are limited and reluctant to refuse to recognize a pardon. It would likely require a gross abuse of power for that to happen (the House of Representatives can consider the abuse of the pardon power to be impeachable). Often when a controversial pardon occurs, say to a political ally or campaign contributor, there is much speculation as to the president's motives.
Interestingly a pardon that occurs before a prosecution has the effect of immunizing the pardoned from prosecution and thus removes the Fifth Amendment privilege against self-incrimination, meaning that he or she would have to testify if summoned to do so.
The president only has the power to pardon convictions for federal crimes: violations of federal law. The president does not have any authority to pardon state convictions (most criminal prosecutions are at the state level). This came up a couple of years ago when fans of "Making a Murderer" petitioned Pres. Obama to pardon Steven Avery. Avery however was convicted in Wisconsin state courts and could not be pardoned by the president.
In Connecticut the state pardon power is vested in the Board of Pardons and Paroles. Our governor does not have that unilateral executive power. One must apply for a pardon through an application to the board.
Persons convicted of federal crimes have to ask the president for a pardon. The Department of Justice has an application process through which it recommends persons to be pardoned . It usually takes various factors into consideration, such as the nature of the offense and what the person has done since the conviction. Of course the president can just decide to issue a pardon for any reason or no reasons with our without anyone's input.