My understanding is that retainers are held in trust and billed hourly as work is performed for the client so ultimately it's the same thing. But maybe I'm incorrect about that.
Retainer is used to refer to more than one thing.
Very commonly, a "retainer" is as you describe - money paid into a lawyer's/law firm's trust account to be withdrawn from that account and applied to future fees and disbursements as they are incurred and billed to the client. (The Law Society requires that money cannot be taken from the trust account until a bill is issued to the client for the fees and disbursements to be covered using that money.)
Very much less commonly, a "retainer" means a flat sum paid to a lawyer/law firm in advance as compensation for whatever work the lawyer/law firm does for the client in a given period - typically, a year. (Sometimes this type of retainer also covers any disbursements and sometimes disbursements are billed to the client in addition to the flat sum.) The lawyer/law firm takes the risk that the client will need more services than anticipated (such that, in hindsight, the lawyer/firm would have made more by charging an hourly rate) and the client takes the risk of needing fewer services than anticipated (such that, in hindsight, the client would have paid less if charged an hourly rate).
Even less commonly, a "retainer"means a flat sum paid to a lawyer/law firm in return for the lawyer/law firm promising not to take work from others - in effect, a fee paid to the lawyer/law firm in return for a promise of availability. (For instance, a public company might pay such a fee to a securities lawyer in return for the lawyer's commitment to be available to the company, and not accept work from a bidder, in the event that the company becomes the target of an unsolicited take-over bid.)
I mention, too, that the word "retainer" also can be used to refer to the matter in respect of which a lawyer/law firm has been engaged (e.g., "My retainer is to defend X in the suit brought by Y.")