Meaning – The tern localhost, refers to the local computer that a program is running on. While this does not need to be specified when using a single computer, the localhost does need to be defined when running programs from multiple computers.
For example, a network administrator might use his local machine to start a Web server on one system and use a remote access program on another.
The local machine is defined as “localhost,” which gives it an IP address of 127.0.0.1. This is considered a “loopback” address because the information sent to it is routed back to the local machine.
Example of usage – “Localhost is often used in Web scripting languages like PHP and ASP when defining what server the code should run from or where a database is located.”