You question was listed under DUI and not general criminal. Assuming you went to prison for a DUI, then the answer most likely is no, you don't get your driver's license back when you leave. Assuming you had a Californa license to start, you'd have to participate in the DUI class/school as ordered by the court.
They don't cancel the DUI school requirement because of prison confinement, they just delay it.
Good luck with your situation.
Vehicle Code 41500 provides for relief from some traffic violations when a person is sent to state prison. However, it specifically does NOT apply to DUI and offenses that involve a mandatory drivers license suspension.
Sign up to receive a 3-part series of useful information and legal advice about DUIs.