What are the differences and similarities between the two? How are they used in the USA? Thanks.
Res judicata (also called "claim preclusion") prevents relitigation of a dispute that was previously litigated or could have been been litigated in a case that was actually filed that was resolved, between those parties or people "in privity" with them, on a basis other than a dismissal without prejudice. It is a finality doctrine that makes sure that litigation ends disputes between the parties that existed at the time the lawsuit was filed once and for all. It covers all finally resolved lawsuits that are resolved on any basis other than a dismissal without prejudice, not just dismissals. For example, a default judgment still has a res judicata effect.
As another example, suppose that a tenant bring a lawsuit against a landlord related to an unreturned security deposit and that lawsuit is resolved by awarding the tenant $1,000. All disputes between that landlord and that tenant, whether or not actually litigated, that could have been brought in the lawsuit are fully and finally resolved and can't be raised in a new lawsuit. The security deposit lawsuit would also bar future lawsuit between the landlord and, for example, a subtenant, because the subtenant is "in privity" with the tenant.
But, if the landlord-tenant lawsuit was brought in state court, it would not bar a future copyright lawsuit between the landlord and the tenant that could have been brought at the time of the security deposit lawsuit, because copyright cases are in the exclusive jurisdiction of the federal courts and couldn't have been brought in that lawsuit.
A dismissal "with prejudice" is a dismissal that has res judicata effect. A dismissal "without prejudice" is a dismissal that does not have res judicata effect and is usually entered for procedural reasons unrelated to the merits of the case, like failure to prosecute, or failure to secure service of process on a defendant. If a claim or party is dismissed from a lawsuit without prejudice, then the person bringing the claim or claims against that party can be refiled in a new lawsuit if the statute of limitations hasn't run yet.
A closely related concept is collateral estoppel (a.k.a. "issue preclusion"). This bars further litigation of an issue decided against a party, if the issue was actually litigated in the case, the case afforded a full and fair opportunity and incentive to litigate the issue, the issue was actually decided on the merits in the case, and the issue to which someone wants to apply collateral estoppel in a new case is identical to the issue decided in previous litigation. Collateral estoppel can apply to both legal and factual issues. It can be raised by someone who was not a party to the previous lawsuit against someone who was a party to the previous lawsuit. Default judgments do not have collateral estoppel effects.
For example, suppose that a lawsuit against General Acme, LLC by George concludes that the statute of limitations does not run until December 31, 2023 for lawsuits against it arising from its flour mill explosion by bystanders and that the explosion was the company's fault following a bench trial on the merits against it which is not appealed. Mary, Jane, and Bob who were also bystanders injured in the same explosion automatically win the statute of limitations and liability issues against the company in their lawsuits against it and only have to prove that they had injuries caused by the explosion and the dollar amount of those injuries to win their cases as a result of collateral estoppel.