After a defendant is determined to be guilty of a given a offense, whether by plea or trial, a sentencing hearing will be set.
Sentencing is where penalties are determined by the court, and is also the point where a conviction would take effect.
For lower-level crimes, such as simple misdemeanors, sentencing will usually occur immediately following the plea or trial.
For serious and aggravated misdemeanors, the defendant has the right to request a separate sentencing hearing. On many pleaded-out cases, the defendant will waive his hearing altogether and ask that the judge accept the plea bargain as outlined in the guilty plea.
For felony offenses, an in-court sentencing must take place. Felonies are so important that the court must afford the defendant the right to go on the record even if he does not wish to do so.