A web server is software and hardware that uses HTTP and other protocols to respond to client requests made over the World Wide Web. Its main job is to display website content, such as text, images, videos and applications, to users by storing, processing and delivering webpages. Web servers are also used in web hosting, i.e., the hosting of data for websites and web-based applications.
Computers that host websites must have web server software to be able to store, process and, most importantly, display web content, like documents, images or videos.
A web server usually refers to hardware and software working together.
The web server hardware is connected to the internet and enables data to be exchanged with other devices connected to the web. It is a computer that stores web server software and other files related to a website, such as Hypertext Markup Language (HTML) documents, images and JavaScript files, and is installed with web server software. The computer includes numerous components, including processor, RAM, high-capacity storage drive, and one or more network interface cards.
Web server software controls how a user accesses hosted files. Its primary function is to display the content of hosted websites on a user's device, e.g., computer, smartphone, tablet, etc. The software is accessed through the domain names of websites -- multiple domains can be hosted on one web server -- and ensures the delivery of the site's content to the requesting user.
The web server understands web addresses, also known as URLs. Like web server hardware, web server software is also composed of several components. Also, most of them support and use HTTP to view webpages. Besides HTTP, some web servers support Simple Mail Transfer Protocol (SMTP) and File Transfer Protocol (FTP) for email, file transfer and storage.