The hostname is what a device (usually a computer) is called within a network. With emails, it can also refer to the name of the mail server that hosts your messages. It’s something you can choose for yourself (when editing your device, not the server). When you need to be available on the internet, however, your device will use your hostname as well as your domain. An example is mail.domain.com.