is this really a hostname?
The windows computer name is distinct but can, in some circumstances, act as a DNS hostname.
Windows has it's own traditional system of naming which is not DNS. This allows windows computers to communicate by name over TCP/IP even when a DNS server is not present. See NetBIOS naming services.
However when a Windows client obtains an IP-address from a Windows DHCP server in a Windows domain, typically the client computer name is then registered as a host name in the DNS service.
So the computer name isn't really a hostname until it has been registered as such with a naming service.
when the IP changes, I will not be able to connect from another computer using the computer name for a while.
Look up ARP caching.
Open a command prompt and enter arp -a
and arp -?
.
I want my computer name to be stuck to a certain IP,
Use a DHCP reservation in your DHCP server (based on MAC-address of primary network interface).