Subdomain - node ?

What is it called when you set up foo.mydomain.com
I have Googled for domain node and I have nothing.
I want to make a directory mybuddys-stuff and have it resolve to either
foo.mydomain.com/mybuddys-stuff or mybuddys-stuff.foo.mydomain.com
If you can name this feature I can read about it.
Thanks