A retainer is something that holds something else in place. After your braces are removed, a retainer keeps your teeth from moving out of their new perfect position.
Professionals like lawyers or consultants are paid a retainer, which is a fee. The retainer ensures that they will be available to work for you when you need them. You will often pay an hourly rate on top of the retainer once the lawyer or consultant has worked enough hours for you to use up the retainer fee you paid.