Found in Vehicle Code Sections 23221 to 23229, California open container laws make it illegal to have an opened alcoholic beverage in the passenger compartment of a motor vehicle. More specifically, the laws prohibit:
drinking in a car,
possession of an open container in a car,
storing open containers in a car, and
storing open containers in a trunk.
Generally, these violations only constitute infractions. That means they are equivalent to traffic tickets, and a conviction does not give someone a criminal record.
A notable exception, however, pertains to California's law against a minor in possession of alcohol. Vehicle Code 23224 makes it a misdemeanor crime for a minor under 21 to drive or ride in a car with alcohol. Furthermore, Business & Professions Code 25662 makes it a crime for a minor to be in possession of alcohol in any public place.
It goes without saying, also, that if a driver is actually consuming alcohol when he gets stopped by the police, he will also be investigated for possible DUI. A DUI is a misdemeanor crime that carries serious repercussions in terms of driving record, criminal record, social stigma and car insurance costs.
The upshot for California motorists is simple: Never have an open container of alcohol in your car. If you do transport alcohol, keep it sealed and in the trunk. And keep it away from minors.