Your landlord can make you pay a security deposit when you first rent your place. A security deposit is often called a last month's rent deposit, or LMR.
If you pay your rent by the month, or any longer period, the deposit cannot be more than one month's rent. If you pay your rent by the week, it cannot be more than one week's rent.
Your landlord can use this deposit only as a rent payment for the last month or week. Your landlord cannot keep it for any other reason, such as paying for damage or cleaning.
Any time your rent goes up legally, your landlord can require you to increase ("top up") your security deposit by the same amount.
Your landlord must also pay you interest on your deposit each year, but they can apply that toward any top-up you owe them. The interest rate is the same percentage as the rent increase guideline, so the two amounts often cancel each other out.
Your landlord can also ask you to pay a deposit for your keys or access card, but the amount cannot be more than it would cost to replace them.