Localhost is basically a local server that allows you to host your website online on a local IP that is visible only in your system, by connecting to another host computer or web server like Apache Web Server.
8080 is the port address through which you can access your localhost’s dashboard.
What is Apache Web Server?
The most widely used open-source, cross-platform web server meant for hosting one or more HTTP-based websites. It is free to download and is considered to be a reliable platform by a majority of internet consumers on a global scale. By Nov 2013, it was responsible for running 67% of all the web servers around the globe.Its official website - httpd.apache.org
The relevance of localhost: Allowing web developers to test their development effort in a test environment. So if anything goes buggy then the production remains unscathed. Localhost testing can boost a team’s confidence about changes related to their release before it goes live in their production. Service providers like XAMPP, LAMP, WAMP have made it all too easy to deploy an Apache web server for hosting your locally stored website.
XAMPP is an open-source service provider that allows you to deploy an Apache web server for hosting your locally stored website.
Once you hit start on Apache. It will start hosting a web server for you, to perform local testing. Hit the URL - http:localhost:80 and you will hit the XAMPP Dashboard.
Note:- 80 is the default port at which XAMPP listens to when hosting a web server. Usually, every networking systems use the IP address 127.0.0.1 as a part of addressing their localhost. That is the most commonly used IPv4 "loopback address" and it is reserved for that purpose.
If you are looking for something simpler than XAMPP to serve your purpose of testing a website on Apache test environment, then LambdaTest would be the right call! A free cross-browser testing tool that provides a feature to test your locally hosted web pages using the tunnel hosted through LambdaTest cloud servers. You can perform testing on simple and plain HTML, CSS, Python, PHP etc. similar web files that are stored on your local system.