If you are found guilty of a criminal offense in California, then you will not necessarily go to jail immediately after trial. The judge has three options: (1) keeping you in custody if you were already in jail; (2) ordering you into custody even if you were not in jail; or (3) requiring you to post bail to secure your appearance at the next hearing.
After a defendant in a criminal case is convicted of at least one charge by a judge or a jury, a judge must impose a sentence. Before this happens, the defense and the prosecution each have an opportunity to present an argument about what the appropriate penalty should be at a sentencing hearing.
Under California law, a misdemeanor sentence must be handed down at six hours and no more than five days after a conviction is entered. Felony sentences must be scheduled within 20 days of a guilty plea. There are some exceptions to this general time frame for both felonies and misdemeanor cases.
At a sentencing hearing, the prosecutor and defense attorney present evidence and arguments to make a case as to why the sentence should be lighter or harsher. These are known as aggravating and mitigating factors. After the judge issues a sentence, you may be taken into custody.