Many indemnities are created by contract, under which the paying party promises to pay an identified loss if a particular trigger event happens (usually an event over which the paying party has control). The trigger for payment and the amount payable depend on the contract's drafting and interpretation. For more information, see Practice note, Contracts: indemnities.
An indemnity is routinely included within a contract of guarantee because an indemnity, as a primary obligation, is likely to be less vulnerable to challenges than a guarantee. For more information, see Practice note: overview, Guarantees and indemnities.
Indemnities under English law have their basis in the common law, principally the common law of contract and the common law of agency. Their operation has not been affected by EU law or by Brexit.