Tenancy agreement: a legal contract
The tenancy agreement is a legal contract that sets out the rights and responsibilities of a private landlord, and the rights and responsibilities of the tenant.
It describes how much rent the tenant should pay, what repairs the landlord must do, and the rules about leaving the property.
An agreement is created when the landlord gives the tenant written, or verbal, permission to live in the property for an agreed rent. Once there is an agreement like this you become bound by specific laws.
So it's in your interest to have a proper written tenancy agreement to prevent later disputes about who's responsible for what. This is a complex area - get specialist legal advice if you're unclear.
A landlord has legal responsibilities - you must carry out certain repairs for instance. A tenancy agreement cannot override these responsibilities - it cannot make the tenant responsible for these repairs.