A web server is a program that is running on a remote computer that is also called a server. The purpose of the web server is to answer to the requests of the online users. These requests are made from the browsers to the web server via the Hyper Text Protocol (http://).
Every web hosting company has a web server software installed on their servers (machines). An example for a web server program is the Apache web server software. The main responsibility and function of the web server is to process and deliver web pages to clients (web browsers)
How it works: when the online user types in the browser the URL of the page they are looking for, the computer, on which the browser is, sends a request to the IP address of the remote machine, on which the web server for this particular page is running. When the web server receives the request, it sends the correct page and its content to the IP address of the computer which has sent the request. Then the web browser translates it into human-readable content such as text, images, videos and so on and all of this is done in the span of a second.