Typically through your web hosts control panel. They point to a different document root folder.
Typically this is just an addition of a "VirtualHost" to the configuration file.
<VirtualHost *>
ServerName sub.domain.tld
ServerAlias www.sub.domain.tld
DocumentRoot /path/to/httpd/docs
ServerAdmin admin@domain.tld
</VirtualHost>
Please see VirtualHost in Apache's documentation. There are equivalent things for IIS and other servers.