The basic arrangement
The firm is paid a percentage of what it recovers, and nothing if it recovers nothing. Rates commonly step up if a lawsuit is filed and again if the matter goes to trial, so a single quoted percentage often understates the range.
Contingency rates are negotiable and are not fixed by law in ordinary injury cases. Medical malpractice is the notable exception, where California imposes a sliding scale.
Costs are separate from the fee
Filing fees, record retrieval, expert reports, deposition transcripts, service and investigators are case costs. They are usually advanced by the firm and reimbursed from the settlement, and they are additional to the percentage.
Ask explicitly whether you owe costs if the case is lost. Practice varies, and it should be in writing.
The clause that decides your net
Whether the percentage applies to the gross settlement or to the settlement after costs are deducted. The difference is the fee percentage applied to the costs, which on a case that went to experts can be a substantial sum.
Both arrangements are lawful and common. The point is to know which you agreed before you sign — it is far easier to discuss then.
Model it before you sign
The fee calculator shows both orderings side by side with your own figures, along with costs and liens. Five minutes there makes the retainer conversation concrete.