This type of fee is often paid by large corporations to make sure they have access to their lawyers whenever they need advice or representation. A true retainer is usually non-refundable. In this situation, the fee is placed with the lawyer at the time the lawyer is hired by the client. The lawyer draws against this deposit to pay costs or to pay legal fees as they are earned. The unearned part of this fee is usually refundable.
Most attorneys require retainers for most kinds of cases.
Be sure to ask your lawyer what the retainer covers and whether it is refundable. Legal fees are paid to a lawyer for her advice and services. There are other expenses, such as filing fees, copying costs, expert witness fees, etc. These costs are paid by the client even if the case has been accepted on a contingency basis. This is the fee the lawyer charges for the first visit.