If two people own a property as joint tenants and one of them dies the other automatically becomes the sole owner.
If they own it as tenants in common then they will each have a specific share, eg half or a third, in it which they can leave to whoever they want when they die.
A joint tenant can sever the joint tenancy at any time to create a tenancy in common and the law will presume that the property is then owned in equal shares unless there is evidence of unequal contributions to the purchase.
Seek legal advice on what’s best to do in your specific circumstances.