There are numerous methods available for creating and utilizing templates (as well as themes), all based on the technologies you are using, what they are capable of, or what you prefer to use.
While WYSIWYG website software such as Dreamweaver offers tools for designing website templates and themes, it often limits users to their own proprietary platform.
Many professionals tend to avoid being restricted to proprietary software and instead opt for server-side CMS systems and/or client-side frameworks. Beginners may first encounter the concept of templates and themes through popular CMS platforms like WordPress, or through simpler options like those offered by GoDaddy or Wix.
If you enjoy manual coding and creating your own system, the possibilities are endless. Ultimately, you will likely be utilizing templates and/or themes in one of two ways: either loading templates client-side using a Javascript framework, or loading them server-side through a CMS like WordPress.