A retainer is a fee paid in advance in order to secure the services of a law firm. This arrangement is more likely when an attorney feels that the finances of a client are questionable, or at the start of a major project on behalf of a client, in order to cover the up-front costs of the attorney.
If the firm is using the modified cash basis of accounting, these retainers are recognized as revenue upon receipt of the cash, even though no services have yet been performed. If the firm is using the accrual basis of accounting, retainers are recognized as a liability upon receipt of the cash, and are recognized as revenue only after the associated work has been performed. The advantage of a retainer, of course, is that the firm has no cash flow issues, since it already has the cash and has not yet made any offsetting expenditures.