Whether an beginner or advanced user of Sitecore, it can be challenging at times to know how Sitecore interoperates with itself. Fortunately Sitecore has a few great resources that clearly explain these key items.
But first, its critical to think of Sitecore in layers. There is the XM (content management/publishing/session/forms/public facing) layer, the XP (analytics/personalization/AI) layer, and finally the XC (commerce components) layer.
Within each of these layers are Application Roles (think servers, App Services, or Containers running the Sitecore application), the Storage Roles (aka databases), and the Indexes (aka, Solr Search data/operational indexes).
The following links for Sitecore 10 provide a strong breakdown of each of these components: