In first party insurance, a Declaratory Judgment lawsuit (see lesson 41) is fairly similar to other contract-based litigation. In liability insurance disputes, though, there is an added element.
Liability insurance policies provide coverage for when the insured gets sued by somebody else. If the “underlying claim” (the claim against the insured) is within the policy’s coverage, then the insurer typically has the duty to defend (meaning to supply defense counsel and pay for related costs) and indemnify (pay what the insured ultimately owed the other person).
Sometimes, the ultimate facts determined in the underlying lawsuit will affect coverage, and vice versa.
The classic case is when the claimant (the party who sued the insured) asserts that the insured intentionally harmed the claimant. Intentional injury is not covered by insurance. So, the insurer files a DJ arguing that the insured is not covered because he acted intentionally. If the DJ judge rules that the insured acted intentionally, that will effect the underlying case (because there will be a judgment that the insured acted intentionally).
In such cases, some states hold that the DJ must go first, others hold that the DJ must take a backseat.