Plea bargaining is a process whereby the defense attorney negotiates with the district attorney to obtain the best possible plea for his client. Occasionally, the judge may be involved in the plea negotiation by speaking to the attorneys in an "in chambers" conference. The typical result of the plea bargain is an agreement for you to plead guilty to a particular charge or set of charges in exchange for a set of terms, such as agreeing to receive a specific sentence or reduced charges in exchange for information about others who may be involved in the incident.
Plea bargains are often good, but of course some are not. You NEVER have to accept an offered plea bargain. Even after entering a plea, you can sometimes make a motion to withdraw the plea and go forward with the defense of your case.
This process may include charging the defendant with a lesser charge, or agreeing to a lesser punishment for the same charge. Sometimes, the prosecution will drop counts in exchange for something they value.
For example, if a defendant is charged with felony assault and carrying a concealed weapon, a plea bargain may result in the prosecution agreeing to drop the concealed weapon charge and lower the felony assault to a misdemeanor assault in exchange for a guilty plea, which makes their job easier than if you pleaded not guilty and took the case to trial.