If you are sharing your home with your landlord, you have fewer rights than living separately. If the landlord won't be living with you, you'll almost certainly get an agreement called an 'assured shorthold' tenancy. This usually only runs for a set amount of time - called a 'fixed term' - usually six or twelve months. Your tenancy agreement will probably say you are responsible for paying the rent right up to the end of that period, even if you leave before.
Tenancy agreements are often long and wordy. But it's a contract that gives you legal responsibilities, so make sure you read and understand it before you sign it. Make sure the details are correct - your name, the address, the date the tenancy starts, how long it lasts, landlord contact details and so on. Ask for a copy to take away before you sign anything.
The Goverment's model assured shorthold tenancy agreement is for use in the private rented sector. It is particularly designed for tenancies of two or more years, and therefore includes provisions for rent reviews and for either the tenant or the landlord to end the tenancy during a fixed term in the event that their circumstances change. Tenants and landlords can download the agreement and its explanatory notes from GOV.UK.
A landlord is now required to provide a tenant with prescribed information in the form of a copy of How to rent: the checklist for renting in England. The guide is to help you understand what questions to ask, what your rights are, and what responsibilities you have.
If you are not sure what kind of tenancy you have, you can find out using Shelter's Tenancy Rights Checker.