A security deposit provides protection for a landlord's investment and motivation for you to fulfill your obligations as a tenant. Its purpose is to cover the cost of returning the dwelling to the same condition that existed when the tenant took possession. A landlord may keep only that part of the security deposit needed to cover the cost of actual repairs not due to normal wear and tear.
If you pay your security deposit in cash, you should get a receipt. If you pay by check, the canceled check with a notation identifying the sum as a security deposit is an adequate receipt. Since the security deposit belongs to the tenant, the landlord must act as a trustee of the money during the tenancy and must keep it separate from his or her own money.
If the premises are still occupied by another tenant, ask for a clause in the lease stating that you and the landlord will jointly inspect the premises before you assume occupancy, and that you will jointly sign an inventory and description of furnishings. Pictures taken at the time you move in and when you leave can help prove the condition of the unit if a dispute should occur (see Apartment Inspection Checklist). You cannot be charged for damages to the premises that occurred as a result of their occupancy.