localhost is a networking term; it’s the hostname for the loopback network interface of whichever server it’s said in reference to (meaning every server has a ‘localhost‘). The loopback interface bypasses any local network interface hardware, and serves as a method to connect back to the server itself. The term localhost is used often in both networking and in server administration.
The IPv4 address for localhost, or the loopback network interface, is 127.0.0.1.
The IPv6 address for localhost, or the loopback network interface, is ::1.