Workers' compensation laws changed the legal relationship between employers and employees. Under California Labor Code §3600(a), the employer is liable for compensation without regard to negligence, and that liability stands in place of other liability except where the law says otherwise. The employee gets benefits without proving fault; the employer gets protection from most lawsuits. Independent contractors are outside this system, which is why classification matters.
Exclusive remedy: where the conditions of compensation are met, compensation is generally the employee's only remedy against the employer (§3602(a)). Ordinary negligence by the employer stays inside the compensation system. The same subdivision says a dual capacity, such as the employer also owning the building, does not permit a suit against the employer.
Section 3602(b) lists exceptions that allow a suit at law against the employer:
injury caused by the employer's willful physical assault;
injury aggravated by the employer's fraudulent concealment of the injury and its connection to the work;
certain injuries from a defective product the employer made and sold to others.
Coworkers: §3601(a) makes compensation the exclusive remedy against a coworker too, with two exceptions: a willful and unprovoked physical act of aggression by the coworker, and the coworker's intoxication. In those cases the injured worker may claim compensation and also sue the coworker. Under §3601(b), the employer cannot be held liable, directly or indirectly, for damages awarded against the coworker.