It lets you live in a property as long as you pay rent and follow the rules. It also sets out the legal terms and conditions of your tenancy. It can be written down or oral (ie a spoken agreement).
A tenancy can either be:
fixed-term (running for a set period of time)
periodic (running on a week-by-week or month-by-month basis)
See useful links – G – GOV UK > Housing and local services > Owning and renting a property > Private renting for tenants: tenancy agreements