These days the courts are so clogged with criminal cases that prosecutors settle most, the fight being mainly over what terms. In Wisconsin, the judge will not participate in plea negotiations. Judges do get involved in plea negotiations in some other states, such as Illinois. Although in Wisconsin they don't get directly involved, they often apply indirect pressure to settle, on one or both sides, sometimes by setting strict dates for trial and other hearings, and sometimes by ruling in favor of one side or the other on key pretrial issues. They generally have wide authority for how they decide these issues, and they like to keep their docket moving. If you accept a plea offer from the prosecutor, generally you will need to change your not guilty plea to either guilty or no contest. In Wisconsin, most counties will normally allow no contest pleas, only demanding guilty pleas in unusual cases. Some counties do the reverse, however.
Guilty or No Contest
The basic difference between guilty and no contest is that for guilty you admit on the record that you actually did the crime. One key effect of this is someone who files a lawsuit against you can point to the guilty plea in your criminal case and say "he admits it, we win." If you plead no contest, however, you are essentially saying only that you don't want to fight the charge. You still must admit on the record that the State has a factual basis for the conviction. Your attorney can specify for you that all you admit to is a jury could reasonably find you guilty based on the evidence the State has. That's a subtle but sometimes important difference. If you plead no contest, the judge will find you guilty for the criminal case alone. No one in a civil lawsuit will be able to point to your no contest plea and say, "he admits it, we win."
You Takes Your Chances
In Wisconsin, judges are not bound by the terms of the plea agreement. That agreement is only between you and the prosecutor (acting on behalf of the State). Generally the agreement includes a "joint recommendation" to the judge as to what the sentence or other disposition should be. Sometimes, however, the agreement is only to "plead and argue." Usually the agreement will involve pleading to fewer and/or less severe charges than were initially brought against you. If there's no joint recommendation, both sides are free to argue what the sentence should be, or the prosecutor may agree to a cap (limit) on his argument. The judge may sentence you up to the maximum for the charge or charges to which you plead. But judges rarely "jump the plea agreement" by sentencing you more harshly than you agreed upon. That's because if word got around they did that, no one would accept plea deals anymore. The courts would become crushed in trials.
A Change of Heart
Plea offers and counter-offers, negotiations in general, are commonly exchanged at pretrial conferences or court hearings, but may also be exchanged at any time. If an agreement is reached, the parties notify the court and a date is set for the plea hearing. Depending on the agreement and the seriousness of the charges and so on, the plea hearing may be combined with the sentence hearing and done all at once. Before the plea hearing, you and your attorney will thoroughly discuss the pros and cons of the agreement, and will fill out a written plea questionnaire together, and then sign it. At the plea hearing, the judge questions you on the record to ensure that you're clear-headed and entering the plea of your own accord. On more serious cases, a pretrial investigation (separate topic) is ordered, and the sentence hearing is set for a couple months later. There's any number of reasons why you or the prosecutor might want to back out of a plea agreement.
When You Can Back Out and Why
A plea agreement is a form of contract. Once your plea is entered on the record, the agreement gets harder to cancel. The key event, however, is not the plea hearing but the sentence hearing. A separate legal threshold applies, depending on whether you seek to withdraw your plea before or after sentencing. If you have entered a plea of guilty or no contest but have not yet been sentenced, the judge may allow you to withdraw if: 1) you present "a fair and just reason for doing so;" and 2) the prosecution has not been "substantially prejudiced" by reliance on your plea. Sometimes a simple change of heart is enough. An example of prejudice to the prosecution would be if a key witness has disappeared, but would have been available if you had gone to trial on the date initially set. After sentencing, you must show a "manifest injustice" if not allowed to withdraw your plea. An example is new evidence that shows your innocence but was unknown before you were sentenced.