Site Template is a pre-defined set of configuration, layout, and content files that define a site model for an SharePoint application. In built SharePoint has shipped with the set of site templates or we can create our own site templates.
Each site collection site is associated with a site template. While creating a new site collection for an web application from Central Admin, we need to select a site template from Template Selection section.
Once we crate site collection, share point stores some of the files in the file system of front-end webs servers and some content in back-end databases. When we request for a page from browser, SharePoint engine will decide from where it needs to pick the data either file system or content database.
Sample Site Templates:
Collaboration - Team Site
Collaboration - Blog
Collaboration - Coommunity Site
Enterprise - Document Center
Publishing - Publishing Portal
Publishing - Enterprise Wiki