Subrogation is the legal doctrine of substituting an individual or entity for another with respect to claims, rights, or securities. There are two ways for subrogation to arise: legally or conventionally, as part of a contract. Subrogation is used in law as an equitable device to prevent unjust enrichment.
When an individual or entity pays the debt owed by a debtor to his or her creditor(s), that individual or entity becomes the creditor to the debtor and takes over the rights and remedies of the original creditor; this substitution of one creditor in place of another is called subrogation. Subrogation is commonly used in the insurance industry as a legal right in situations where a claim has been paid for by the insurance company. This allows the insurance company to pursue legal action and seek reimbursement from the party responsible for damages.
For example, if X caused damages to Y and Y is reimbursed for damages by his insurance company, the insurance company can sue X for recovering damages it caused Y through subrogation.