Many people are employed "at will", meaning that they don't have a formal employment contract with their employer and state law thus permits their employment to be ended at any time, or that they do have a written contract under which contains an "at will" clause to that same effect. However, even "at will" employees are entitled to certain legal protections against wrongful termination, and cannot be fired for reasons that violate the law or public policy.
The Civil Rights Act in 1964 extended anti-discrimination protections to employees, whose employment could no longer be terminated for reasons such as their race, gender, skin color, religion, or national origin. Additional legal protections now exist to deter certain forms of age discrimination. Following the creation of these anti-discrimination laws, it became possible for employees to argue that their terminations were "pretextual" - that is, although their employers were citing lawful reasons to terminate their employment, their employers were actually motivated by unlawful discriminatory motives.
Within this context, it should be noted that employers of at-will employees may end their employment for reasons that are arbitrary, provided they don't run afoul of the law. For example, while civil rights law protects employees from being fired because of their skin color, there's no similar protection against being fired because an employer doesn't like the color of your car. At the same time, any employer who might face a discrimination claim would be ill-served by trying to defend a wrongful termination lawsuit by presenting such a ridiculous basis for the decision to fire an employee.
In addition to the express protections against wrongful discharge which are granted by law, most states recognized certain "public policy" protections against discharge. While the nature and availability of these reasons will vary, often significantly, between jurisdictions, the underlying rationale remains the same: The common law, or othe laws set forth by a state legislature, creates an express or implied public policy, which will be undermined if employers are permitted to fire their employees in violation of that public policy.
For example, all states have passed workers' compensation protections to provide for the care and support of workers who are injured on the job. If employers were allowed to fire workers for filing workers' compensation claims, their actions would undermine the public policy behind those laws. Similarly, many states will permit a lawsuit by an employee who was fired for refusing to perform an illegal act.
In what might be regarded as a statutory extension of public policy, most workers are covered by "whistle blower" statutes which may support an action against the employer if the employee is fired for informing a state or regulatory agency about the employer's misconduct. Typically, the employee must make the report to the agency which is responsible for responding to the employer's misconduct - such as, for an employer which is dumping used oil down a storm drain, a state or federal environmental protection agency. Employees are not ordinarily protected for other types of disclosure, such as telling friends about the employer's misconduct, or for reporting the misconduct to the news media.
It is important to note that the statute of limitations applying to whistle blower cases is usually very short - some statutes require that action be taken literally within weeks of the employer's retaliatory act. Thus it is usually important for whistleblowers who suffer retaliation to consult with lawyers as soon as they can after they learn of the retaliation.
Even employees who do not have written contracts of employment may be able to bring actions based upon the content of employee handbooks or manuals. Where a company document of that nature outlines a disciplinary process that must precede termination, the failure to follow that process may support a wrongful termination suit. If such a document states that employees will only be fired "for cause", an employer may have to document valid cause, such as the employee's failure to meet performance standards, if the termination is challenged.
Many employers insert language into their handbooks and manuals in an effort to avoid this type of consequence, to the effect of, "Nothing in this manual consitutes a contract of employment between the employer and its employees, and the employer may at its discretion elect not to follow any guidelines or procedures set forth herein in association with employee discipline or termination."
Some states will permit an "at will" employee to bring a lawsuit on the basis that the employer violated an implied covenant of "good faith and fair dealing" in association with the termination decision. In such states, even with an at-will employee, the employer must extend some degree of fairness in the decision to terminate employment.