when I go to the Detail View an account or a contact for example, there are several subpanels that appear under the detail view. What controls that list? Is it based on the relationships that are defined for the contact or account?
Yes. There are many pre-defined relationships for the “central” modules like Contacts and Accounts. You can also add new modules, and new relationships, and then make those appear as additional subpanels.
You can manage what appears there in
Admin » Display Modules and Subpanels
and you can manage it with a finer degree of detail in Security Settings (but then you need to setup Security Groups, and assign records to them, etc.). Use this if you need to make different subpanels for different classes of users (like admins vs. regular users).