Do not hand over money unless you are happy with the property and the terms of the tenancy. Try to avoid giving cash and always get a receipt. A deposit is usually the equivalent of one month's rent.
Once the tenancy ends the deposit should be promptly returned to you. The landlord may only keep some or all of the deposit if there are rent arrears or damage to property above normal wear and tear.