Is there a law in California about being married, but after a certain amount of time of being separated from that person you are considered to not have a marriage any longer.
(i.e. not living with the person for years, because they left you and your kids for another?)
Is the only way to not be considered married.. is to file for divorced.
Criminal Defense Attorney
Although there is such a thing as "common law marriage," where in certain jurisdictions and under certain circumstances you are considered married even though you never went through with any ceremony, there is no such thing as "common law divorce." If you are married and you want to no longer be married, you will need to get a divorce.
In CA, you're either married, with a license from the state, or you're not. Cohabiting for a long time doesn't make you married. Likewise, living apart for a long time doesn't make you divorced. A marital dissolution requiers a dissolution procedure and takes a minimum of 6 months from service of the petition and requires the state's (a judge's) approval. CA is a "no fault" state, so you can get a dissolution for any reason or no reason, but the infidelity and abandonment doesn't make you less married.
So yes, you have to file for divorce if you want to be divorced. Please see the "how to" linked below if you want to DIY for an uncontested procedure, with all the forms and explanations you need, or hire a family lawyer.
Disclaimer: Please note that this answer does not constitute legal advice, and should not be relied on, since each state has different laws, each situation is fact specific, and it is impossible to evaluate a legal problem without a comprehensive consultation and review of all the facts and documents at issue. This answer does not create an attorney-client relationship.
You need to get divorced unless your spouse died. Otherwise, any subsequent marriage may not be valid. If you can't find your ex you may serve them by publication once a judge has ruled so. A competent attorney can help you with such process if needed.
Family Law Attorney
There are two ways that a marriage ends under California law:
it's dissolved (there's a judgment of dissolution (divorce) made by a court) or
one of the two spouses dies.
Those are ALL the ways a marriage ends under California law.
If both of you are still alive, and there's no divorce, you're still married.