Creating sub domains with different content

Hi,

Can somebody please let me know how to create a subdomain that point to a different folder?

i.e.

www.mydomain.com - /home/mydomain/
www.sub.mydomain.com - /home/sub.mydomain/

Thanks for any help you can give

Richard Webster