When one secures a boat, there are several ways this can happen.
Anchoring: You use your anchor! Because humans have been sailing for a very long time, there are resources that tell where safe anchorages are. When anchoring, it is necessary to consider the location of other boats and how they are anchored. The risk with anchors is of them dragging; fortunately, modern innovations in anchors make this less likely, and there are now GPS-based apps that will tell you if your anchor is draffing.
This is a companion discussion topic for the original entry at https://gettingfr.ee/2018/10/10/first-overnight-passage-monterey-to-morro-bay/