Some sentences will require convicted defendants to serve their sentence in a Jails and some will require they serve their sentence in Prison. There are differences between the two and they each serve a specific purpose.
Jails are county facilities throughout the state which house two types of inmates. Inmates that are pending completion of their criminal cases house for community safety and for inmates who are serving sentences that are a year or less. The maximum amount of time someone can serve a sentence in a jail is a year.
State prisons, on the other hand, are federal facilities often used to house more serious and often violent offenders. These are for defendants that have already completed their court proceedings and have sentences greater than one year.
Jails also consider Good Time, Work Time which due to overcrowding reduces the amount of time served by defendants at these facilities. Typically the range of time taken off their complete sentences is from 30% to 90%. State prison inmates typically serve about 50% of their commitment depending on the seriousness of their crime. A defendant serving time for grand theft may serve 50% of their prison sentence, whereas someone convicted of rape will serve about 80%. The more aggravating the circumstances, the increased percentage of the sentence you will serve. Also considered is the existence of priors, which will increase the amount of time served.
Regardless of whether you serve time in a jail or a prison, the best option is to prevent any type of sentence serving time. An experienced California attorney who knows the prosecutors and judges can successfully argue for alternative sentences that involve no jail or prison time. There are many other options that can be negotiated by an attorney who has the knowledge and skills to persuade prosecution to offer no jail time. Hire someone who has the requisite familiarity with government attorneys and the confidence to obtain the least possible sentence for your case.