It depends on the officer. Most of the time if you are able to produce some sort of satisfactory ID you are given a citation for 12500(a) VC. Your car will likely be impounded for 22651(p) VC or 14602.6 VC, absent any community caretaking or licensed driver being available.

If you can't produce any I'D and the officer can't locate your name given to him you are likely going to jail so you can be finger printed and photographed. Then you are usually given a court date for your citation.

If you are an undocumented alien you should go and get a California Driver license. Make an appointment at the DMV (usually Saturdays) and take your ID documents there. If you can pass the tests you will be given a license (refer to CA DMV website for specifics).

Just to be clear, you cannot pick and choose which city you are arrested in. Odds are one can't solely reside and stay completely in the confines of a sanctuary city. Even then, immigration is a Federal issue and most of the officers that will pull you over deal onpy with State of CA crimes.