Windows 'hosts' file contains mappings of IP addresses to hostnames.
You can find the file in the Windows System32 folder if you run your DOS program with administrative privileges as shown.
You can open this file with Notepad also run with administrative privileges. There is another 'hosts' file related to iCalendar.
It is just a text file that you can edit and save with your changes.
More here:
https://hodentek.blogspot.com/2009/07/in-vista-home-premium-computer-name-is.html
You can also use the "Hostsman" application to edit the "hosts" file: