In most plea bargain negotiations there are three parties involved, the deputy district attorney (DDA), the defendant through his/her attorney, and the judge. In order to reach a plea bargain all of the parties must agree.
A normal sequence of events would be for the DDA to make a settlement offer to the defendant's attorney at either a pre-preliminary hearing or readiness hearing for felony cases or at pre-trial for misdemeanor cases. The defendant can either agree to the offer, make a counter-offer, or refuse the offer. At this point there may be some back and forth discussion between the DDA and the defendant's attorney about the weakness of the case, potential defenses and/or mitigating factors. There will also be a discussion of any priors the defendant might have including strike priors. If what the parties believe is a reasonable offer is reached or if the DDA simply refuses to go any lower the judge may given an indication of what she/he is willing to accept or willing to impose as the sentence inline with the plea bargain.
At this point the defense attorney will generally share the offer with the defendant to determine if she/he is willing to accept the bargain as outlined. The defendant is then free to either accept, refuse, or to ask about a different counter offer. The new counter offer will be made to the DDA by the defense attorney if it has not already been discussed and refused. This back and forth may go on for a couple of rounds. At some point either the defendant will simply decide to go to trial or the DDA will simply refuse to go any lower on their offer. When that point is reached it is up to the defendant to either accept the deal or not. The defendant is always in charge of whether or not to take a plea bargain.
If a plea agreement is reached between all the parties, then a advisal and waiver of rights will be taken by the court--often in both a written and verbal form--and the plea will be taken in open court along with any required admissions. After the entry of the plea the court will set a sentencing date and the defendant will be instructed to contact the probation department which is responsible for completing a sentencing report for the judge.
It is important that the defendant fully understand the terms of the plea bargain and what is going to happen. After a plea is entered in open court it is very difficult to withdraw the plea except on specific legal grounds. The defendant generally cannot withdraw his/her plea simply because they have had more time to think and have changed their minds.
Good communications between the defense attorney and the defendant are essential to ensure that the defendant is fully informed and comfortable that the plea they enter is in their best interest.
Be sure the attorney you hire is one you can communicate with and who has the experience and knowledge to help reach the best agreement possible.