What the policy pays for
The insuring agreement covers a claim for a negligent act, error or omission in the performance of professional services, as those services are defined on the declarations page. The definition is the whole policy: an engineering firm's policy covers engineering, and if the firm starts doing construction management, the new work is uncovered until the definition is broadened. Damages are the client's financial loss, which can include the cost of redoing the work and the profit they lost. Defence costs are paid either inside the limit, which erodes what is left for the settlement, or outside it; the difference is worth a great deal.
Most forms also pay for things that are not lawsuits: a licensing board complaint, a subpoena for your files in someone else's dispute, or a demand letter that never becomes a suit. Those extensions carry their own small limits and are the claims a small firm actually sees.