A template file is some file which has some html code in it.

Say I have 2 files
header.html
body.html
footer.html

Which contains the specific html content for the header, body and footer respectively and based on the requirement you can get the content of the file and append it to the page as and when needed.