Page Templates
Explanation
A Page Template is declared from the Administration Application, in its "Page Templates" administration section. Page Templates (for User) explains what a template and a template provider are; this topic covers what you decide when you set one up.
Create a Page Template walks through the two pages you create, the template itself and the provider that offers it, and Template Provider Fields describes every field of the provider form. Use a Page Hierarchy as a Template covers the template that is a whole branch of the wiki.
Two of the provider's fields name locations: one where the template is offered, one where it is allowed to create pages. A location always means that page and everything nested under it. Restricting is how you propose the right kind of content in the right place: an expense report template offered everywhere is noise on a project page, while the same template offered only under "Expense Reports" is the obvious thing to create there.
Creating a page from a location that matches a template's creation restriction, exactly or as one of its descendants, moves that template to the top of the "Type" list and pre-selects it, so your users start from the structured page you intended rather than from a blank one. When several templates match, all of them are moved up and sorted by how specific the matching restriction is, the most specific first.
The same offer is made when a reader follows a broken link. The link opens the creation wizard with the title and the location already filled in from the link, and the templates available at that location are listed there too.

XWiki 17.10.2+ A template may itself require a right, and every page created from it then requires that right as well. A user who does not have it is not offered the template at all. A user who has it where the template is selected but not where the page is being created is shown an error instead of a new page, because the page could not be saved there.
FAQ
Can my users still create a blank page where a template is pre-selected?
Yes. A pre-selected template only decides what the "Type" list starts on, and "Blank page" stays in the list under "Default".
How do I stop offering a template without deleting it?
Delete its template provider, or narrow the locations it is visible from. The template page itself is untouched, and the pages already created from it are unaffected either way.
Is this the same thing as the templates a developer writes?
No. A developer's template is a Velocity fragment rendering part of the interface, which an administrator replaces through Customize a Skin. A Page Template is a wiki page your users copy when they create a page.
More
To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.