The point of time at which sentencing occurs depends on whether or not time guidelines have been waived. You have the right to be sentenced at a later time then when you actually take your plea. It can be from up to 6 hours to 5 days later in misdemeanors. Usually what happens is that time is waived, so that your sentence can be taken right away, and you can start your probation at the time of sentencing. You can start meeting the terms and the conditions, and the time starts ticking on the one year that needs to pass before you can turn around and apply for early termination of probation and an expungement (dismissal).
In felony cases, what typically happens is that sentencing gets put over so that your matter can be referred to probation, your attorney and the District Attorney can submit a sentencing letter, and a probation report can be prepared. If you are out of custody then you will typically remain out of custody on a Cruz waiver – what that means is that you must (1) appear at your sentencing date (2) meet with probation before your sentencing and (3) not get in any trouble between your plea and your sentencing date. If you violate any of the terms of the Cruz waiver then you can jeopardize the deal that was previously negotiated. When you return to court, the judge, your attorney, and the District Attorney get to review the report that was created by probation and their recommendations, along with any letters that were submitted and then your sentence will be imposed.