These few lines of code are all that’s needed to create a template page in wordpress. It must be added to the top of the page before anything else. The rest of the code for the page would go below.
<?php /* Template Name: Example Template */ ?>
Alternatively, you can copy the code from your themes page.php file. That way you keep the same page structure as the other pages of your site yet you can still make changes if you choose. Just change the name of the page and you have a custom page you can use throughout your site.
After uploading the file to the server, you should see the template in the admin area of wordpress. When you create a new page just select the template you just made. You can now use the custom template on various pages throughout your site.