Defendants rarely plead guilty without first reaching an agreement with the prosecution. Instead, they typically admit guilt officially only after receiving some kind of assurance from the government. In the typical scenario, the defendant gives up the right to go to trial in exchange for the prosecution's agreeing to:
(For more on the possible outcomes, see What are the different kinds of plea bargaining?)
Many cases are settled by guilty pleas, but prosecutors and judges sometimes agree to "nolo contendere"—or "no contest"—pleas. These have the same fundamental consequences as guilty pleas, with the defendant receiving a conviction and accepting some kind of punishment. But the defendant doesn't actually admit guilt.
For most defendants, the primary advantage of a no-contest plea is that it often can't be used as an admission of liability in a related civil case.
Suppose Duke and Vince get into an argument-turned-fight. Duke fares better in the bout. Duke is not only charged by the local district attorney with criminal assault—he's also sued by Vince for assault and battery in civil court. After reaching an agreement with the prosecution, Duke pleads nolo contendere to the criminal assault charge.
Traditionally, Duke's plea would mean that Vince couldn't argue, "Hey, he admitted he was guilty in the criminal case, so he has to be liable in this civil case!" (Read more about the differences between criminal assault cases and civil assault cases.)
But the law has evolved in some states to permit the use of some no-contest pleas in civil court. For instance, the California Evidence Code allows a plaintiff to introduce evidence of a defendant's nolo contendere plea to a crime that could have been punished as a felony. (Cal. Evid. Code § 1300 (2015).)
So, in California, if Duke pleaded no contest to assault with force likely to produce great bodily injury, Vince would have been free to introduce evidence of the plea to show Duke's guilt. This form of assault is a "wobbler," which a judge can punish as either a misdemeanor or a felony. Vince would have been able to use the plea even if the judge had imposed on Duke only a misdemeanor sentence.
Ultimately, varying and complex rules mean that you should consult a qualified criminal defense lawyer to understand the repercussions of any kind of plea in a given case.