Homes can be created in settlements. Homes are private, while settlements are public. Anyone can teleport to a settlement, but only the current home resident can teleport to homes. Settlement owners can trust other players to build in their settlements using /settlement trust but homes are owned exclusively by one player. All claimed land is fully protected by the server.
Buying a home in a settlement means that you own the home and all plots claimed by the home. Settlement owners cannot build or access protected storage in homes that they do not own.