Templates set the design and format
A template sets the design and format of a document. The template contains the most important elements that repeat in all documents of these types. The document can be a text file, brochure or website, but it can also be a greeting card, invoice or more. The template lays out the basic framework which then needs to be filled with content.
Templates are used in different contexts
A template has many advantages: by using templates, it is enough to just format the document once. Whenever a new invoice then needs to be created, the already made template can be filled with the new data and does not need to be formatted again. This not only saves time, but will ensure a consistent design in all documents of the same type. Templates are very popular in web design and web development, especially in shop or content management systems. Templates set the design for the complete website. They are often offered for free as downloadable open source templates, and they can be used for your own website. There are numerous template vendors for all popular content management systems like Joomla or Typo3.
The term template can also be found in programming. It refers to a program code that can be used again and again.
You can find more information on templates on Wikipedia: https://en.wikipedia.org/wiki/Template (word_processing)