An employee is wrongfully terminated if he or she is fired for an illegal reason. The reason may be illegal because it violates an established law or because the firing goes against a public policy.
A firing may constitute a wrongful termination because it violates the law prohibiting discrimination based on protected classes. Even if the firing violates no law, it may still be considered a wrongful termination and, therefore, illegal if it goes against an established policy of the state. For example, firing an employee because they were selected for jury duty is a wrongful termination because the California Constitution supports people serving on juries.
See, CACI 2430.