There's dozens of threads on California laws.
The basics are:
16 years old, valid driver's license with a M2 endorsement (bikes under 150cc) or an M1 (motorcycles over 150cc, which means you can ride any two wheeled cycle.)
You can ride with an M1 or M2 permit (lasts a year, no passengers, can't ride at night.)
Bike must be plated and registered. One time fee (I think it's $22 now?)
You need a DOT approved helmet.
Bike must have headlight, taillight, brake light, left mirror, and horn.
No turn signals or insurance is required.
These are the FACTS from the California DMV.
There are no loopholes. There are no 50cc or under exemptions. There are no "automatic transmission" exemptions.
Enforcement in your area may differ. Some cities don't care, some do. Cops are cops. Some are cool, some aren't.
Don't believe anyone that tells you otherwise. Craigslist sellers and forum members love to tell you that you don't need a license, or what it's like in their state, or neighborhood, or that they found a way around the law. They've never been ticketed, had to go to court, and had to pay a fine. Or done any real research. I have. It's a bigger pain in the ass dealing with a ticket then mailing in a money order and riding legal.