For purposes of motor vehicle licensing, California considers your residency as your state of domicile. California defines your state of domicile as the state in which you have your true, fixed, and permanent home and principal residence and to which you intend to return whenever you leave it. Evidence of residency for driver licensing purposes includes, but is not limited to, the following:
Good news! If you are visiting California and you are over 18, you may drive using your valid home state or country driver's license.
Note: If you have changed your name so it no longer matches that on your documentation, you must have Social Security update your name before you provide that documentation to the DMV.
Note: If you are a noncitizen, you should not normally need a Social Security number to get a driver's license from the California DMV as long as you can provide documentation verifying your birthdate and legal presence in the US. However, if you wish to get a Social Security number or contact the Social Security Administration to learn more, please read this short publication from Social Security.