Template is composed of:
Example of Epic template looks like on picture below:
To create issues linked to Epic you can use any issues type you have configured in your JIRA instance.
Issues in Epic can be a part of any JIRA projects crated in your JIRA instance.
How to create Epic and linked issues you can read on Atlassian Jira Epics Tutorial.
More about sub-tasks you can read here Atlassian support page.