Every lawyer or law firm has its own practices. Generally, after free consultation, if you decide to hire a lawyer, they will ask for a retainer. The retainer is like an escrow account. They estimate how much a case is likely to cost and ask for a check. The money is deposited in an account of firm/lawyer but generally they can only withdraw money for service rendered.
Example: an attorney may ask for $2000 retainer. If they bill per case, that money will be theirs once your case is settled/closed. If they bill hourly, they will invoice the number of hours worked on the case and if below the $2000 they will reimburse the balance, if more, they will bill you.
In any rate, you are entitled to an detailed explanation of billing practices when you contract a lawyer.
Typically, a lawyer will charge you for each hour or portion of an hour that the lawyer works on your case. For example, if the lawyer’s fee is $150 per hour and the lawyer works 10 hours, the fee will be $1500.
There are other arrangements that lawyers can establish with clients.