Introduction
Below is how you will be able to create a wildcard sub domains.
Procedure
1. Log into your cPanel.
2. Navigate to Domains section > Subdomains menu:

3. Create a subdomain * pointing it to the necessary folder (you will need to specify the path in the field Document Root):

4. Go to the Zone Editor menu:

5. Make sure that there is an A record for *.yourdomain.com created and pointed to the server IP address (it could coincide with the IP address of your main domain or ftp.yourdomain.com is pointed to):

6. Allow for propagation 24-48 hours.