In almost any criminal case, the defendant will be faced with a choice -- (1) go to trial and face severe consequences if they lose or (2) plead guilty in exchange for lighter consequences. Depending on the nature of the charges, the difference could be years in prison versus probation or a career-ruining criminal conviction versus the equivalent of a speeding ticket. Throughout the entire case, the prosecutor will be there reminding the defense attorney, and ultimately the defendant, of what's at stake.
For many defendants, the decision will seem like a no-brainer. If they aren't guilty, there can't be any way that the prosecutor will have the evidence to convince a jury that they are. In addition, pleading guilty might seem like lying by saying they did something that they didn't do. Further, friends, family, and employers may take the guilty plea as a sign that they really did do it and treat them differently thereafter.
No matter how strongly a defendant believes in their innocence, the truth is that the consequences are real and things aren't always black and white. A defendant may truly believe that they did nothing wrong when in fact they did violate the law. At trial, the evidence rarely perfectly reflects what happened. Eyewitnesses can make honest mistakes, and juries may be asked to play mind readers to determine someone's intent. Whether through differing interpretations or flat-out wrongful convictions, the truth is that defendants who truly believe they are innocent are regularly convicted.
What may give many defendants pause is that a guilty plea typically requires them to admit to committing the conduct charged (or pleading no contest, which has the same effect). Before a judge can accept a guilty plea, they must first question the defendant as to whether they are knowingly and voluntarily making the plea. They will then require the defendant, under oath, to state what they did and will question the defendant until they are satisfied that they have admitted to each element of the crime charged. In short, a defendant who believed they were innocent would be required to lie under oath to plead guilty.
The law provides another option with an Alford plea. In North Carolina v. Alford, the United States Supreme Court held that a defendant may plead guilty without admitting guilt. In an Alford plea, the defendant says that given the evidence, the possibility of going to trial and facing the maximum consequences is too risky in light of the lesser consequences offered in exchange for a guilty plea. In short, the defendant accepts the plea deal as an insurance policy against being convicted on all charges and being harshly sentenced.
An Alford plea may be beneficial in cases that truly contain gray areas. Even though you never have to prove your innocence, it is sometimes hard for a jury to disregard believable evidence presented by the prosecution if the defendant isn't in a position to offer anything to contradict it. In any criminal case, you should work closely with your attorney to evaluate the prosecution's case, the available defenses, and how each might be perceived by a jury. If you come to the conclusion that there is a strong chance you might be convicted and you have received a favorable plea offer, pleading guilty might be the best course of action.