Unless you live on a boat, or are homeless, then your occupation of property, however temporary, has some form of legal status:
Occupation without permission – this makes you a trespasser or a squatter and liable to be sued. In most of these cases, you are at risk of criminal and civil prosecution.
The family home – technically the person(s) who own the family home can ask everyone that lives there to leave (the other immediate family members usually have no legal basis allowing them to stay). However the law mostly protects against such eviction, especially if there are children under 18 in occupation. If granted, the right to continue in occupation is called an ‘occupational right’. It is a very limited right of occupation: you could not (for example) sell or mortgage the property.
Staying in AirBnB, hotels, work accommodation, etc. – you have a licence to occupy. This is also a very limited right. In particular, you have no right of exclusive occupation (meaning the managers can enter the property any time). You cannot act like an owner and the length of your stay is very restricted (e.g. you lose your job, you lose the accommodation). In legal terms, a licence is less a right of occupancy and more a temporary waiver of the right to sue you for trespass provided you honour the conditions imposed by the owner!
After the death of your partner – mostly surviving partners are given/already have ownership of any property they lived in upon the death of one or the other partner. Sometimes however the deceased partner gives the surviving partner the right just to continue living in the property until their death. After that, the property goes elsewhere (e.g. to the deceased partner’s children). The right of occupancy is an occupational right as above. This option only exists where the deceased partner owned the property. If rented, there is no right to give!
You are renting – you either have a licence to occupy; a tenancy (let for up to 3 years) or a lease (let for over 3 years). Your property rights are set by (i) law; and (ii) the terms of your agreement with your landlord. Broadly speaking, the shorter the length of the agreement the fewer rights you tend to have. These rights can continue to accrue if you live in a property after the term of the tenancy agreement, but the agreement itself is not renewed.
You own your property – if you own it outright then you are a freeholder. If you have it on a long lease (usually 10 – 999 years, but can be shorter: the determining factor is do you pay rent?) then you are a leaseholder. If you are the only leaseholder named on the lease then you are a sole tenant. If someone else is named on the lease with you then you are either a joint tenant (you get the lease if they die) or tenants in common (they could bequeath their share of the property to someone else before they die).
And if you live on a boat? – well, the above rights are about owning and using land and the property on it. Boats aren’t on land, so a whole different set of (less protective) rules apply.