To create a subdomain, log into your cPanel account and click on the Subdomains icon. Specify the name you wish to assign to your subdomain, and the name of the document root / directory you would like that subdomain to resolve to, and click the Add button.
Once the subdomain has been created, there will be a new subdirectory in your public_html folder. If it was not custom-named during setup, it would default to using the same name as the new subdomain. For example:
Upload the index page for your subdomain to that folder.
As far as relative paths are concerned, the subdirectory containing the subdomain will be handled as if it were the root web accessable directory on a separate account when accessed via the subdomain URL (subdomain.domain.com).
For further information:
Please refer to the cPanel documentation for the Subdomains feature, here.