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
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.
all of these locally would access the machine with that hostname