The money would usually earn interest at a fixed or variable rate. When new leases are entered into, a landlord will often require a rent deposit from the in-going tenant.
The terms of such a rent deposit will vary depending on the financial status of the tenant, but can involve the tenant paying up to 6 months rent in advance.
This amount is then held by the landlord in an interest bearing account for the duration of the lease, or until the financial integrity of the tenant becomes established.
Alternatively, it might be held until such time as the lease is assigned and a new deposit is obtained from the subsequent assignee.