This is a complicated area of law and if you are in any doubt you should ask for advice, your local District Council Housing Options Team or Citizens Advice Bureau https://www.citizensadvice.org.uk/ may be able to give you advice for free, or you can seek legal advice but are likely to have to pay for this.
A licence only gives permission for you to live in the property and there is less protection from eviction – only reasonable notice needs to be given, which can be as little as one week if you pay your rent weekly. A tenancy gives you an interest in the property which gives you certain legal rights and you will have more protection from eviction. Tenancy types vary depending on whether you are renting from a private landlord, your local council, a charity or a housing association, the protection you have will depend on the tenancy.
Whether you have a tenancy or a licence is set out in law. If the landlord lives in the property, you are a lodger or it provides short term accommodation such as a hotel, holiday let, bed and breakfast, hostel, shelter or similar it is likely you will be living there on a licence. If you have a room in a house shared with other people which is your specific room or you and your family, if they live with you, are the only people living in the property, and you pay rent it is likely to be a tenancy, although this may depend on the other things the landlord provides.