You may or may not receive a 30 day notice from the lender before they begin proceedings. Assuming you don't, the formal foreclosure proceeding in CA begins with the filing, serving and posting of a Notice of Default. The lender must then do this every month for a period of 90 days before they then serve you with a Notice of Trustee's Sale, which will give you a foreclosure sale date about 20 days out.
All in all, you have about 100 days. Use those days wisely. Contact your bank if you want to enter into a payment plan, apply for a loan modification, hire a reputable professional to review your loan docs to see if you have any legal defenses, but whatever you do, don't wait 'till the last minute. This is your time to do your homework and figure out what your best next step is.