Here is an example
I have a domain that is registered to linux boxes ip.
from the internet you will always access the linux box no matter what name you put in front of it
example:
mydomain.com
mail.mydomain.com
www.mydomain.com
anything.mydomain.com
all of these will point to the same ip address, because that's all I have.
Locally I can use dhcp to setup all other machines to have a lan address and use a dns server to make each name point to the right machine. The local machines will need to be using my dns server for this to work.
www.mydomain.com
mail.mydomain.com
firedragon.mydomain.com
winxp.mydomain.com
winme.mydomain.com
slacker.mydomain.com
all of these locally would access the machine with that hostname