First make sure your DNS is working. You can use a A, AAAA or CNAME record as long as it points to your IP address.
Now go to /etc/apache2/sites-enabled and create a .conf file.
Add following lines to the file:
<VirtualHost *:80>
ServerName subdomain.mydomain.com
DocumentRoot /var/www/subdomain.mydomain.com
</VirtualHost>
Then restart your server:
sudo service apache2 restart