Recently I needed to put a sub-domain on different host than the main domain.  (the main domain was IIS and we needed an apache server)   You may not be able to do this with all hosting companies, so check with them first.  In this case, the servers were with 2 different hosting companies.   With shared hosting you will need to get a dedicated IP address ($12-36 a year) for the domain where you will host the sub-domain or there is no address to point the DNS record at for the sub-domain.  Then you will likely need to call you primary hosting company to set up the a-record for the sub-domain as most shared hosting set-ups don’t give you access to the DNS records you need to point a sub-domain to an IP address.

Remember to redirect all your domains to a common one (see www or not, just make sure you canonicalize it).  Once the DNS records are set-up you can use .htaccess to direct the incoming sub-domain to the location of the files for that sub-domain.

You’ll need something like this in your root .htaccess file.

RewriteCond %{HTTP_HOST} ^sub\.domain\.com$
RewriteCond %{REQUEST_URI} !^/location
RewriteRule ^(.*)$ location/$1 [L]