If your tenancy agreement contains an express term against subletting, you will not be able to do so without risking eviction by your landlord. If there is no express term against subletting, then it is possible in various circumstances.
Assured tenancies need to be fixed in order for subletting to be done without the permission of the landlord. If they are periodic they require the landlord’s permission, who can refuse for any reason.
Secured tenancies require the landlord’s permission for subletting to be done, and only part of the property can be sublet.
Protected tenants may be able to sublet if it is not prohibited or restricted in the contract. They may only sublet part of their home.
A subtenancy is created where a tenant lets some or all of their home to another, the subtenant. It is important to consult a landlord before subletting the property in order to gain permission. Where a tenant sublet without permission and is in breach of the agreement which prevents a sublet, the subletting itself will be held unlawful.
However, this will not affect your tenancy as your relationship remains legally valid between you and your landlord. You may lawfully occupy the property until your landlord ends your tenancy or your landlord's tenancy comes to an end.
Your landlord's tenancy may end if the head landlord makes arrangements for possession proceedings for breach of the tenancy agreement.
However, you may also be permitted to stay on as a tenant if the head landlord agrees to you staying on as a tenant. You may be required to sign a new tenancy agreement in order for the head landlord to become your landlord.
Whether you can sublet or have a lodger in the property will depend on your local council and the type of tenancy you have. Please contact your local council before taking in a tenant or lodger.