They can leave whatever they own outright to anyone they wish.
They can't leave what is owned jointly to another person usually.
If they own their own home or other real estate, then it very much depends on the basis of which it is owned. It will either be as joint tenants or tenants in common. If it is joint tenants then each own the whole, so if one dies the survivor automatically owns the house.
If it is as tenants in common, they each own a share of the property and each can leave their share to whoever they want to.