Diversion allows a case to be paused while the person completes conditions, after which the charges are dismissed and the arrest is treated as if it did not occur. California has several statewide diversion programs, each with its own eligibility rules and exclusions.
Start here: