A web server stores and transfers website data. It has two parts: Hardware and Software.
Web server hardware is the actual machine, typically contained in a secure data center, that stores website data. Website data includes static files such as HTML, CSS, and image files.
Hardware is suitable for storage, but it needs software to make it work. Web server software makes the web work by using HTTP (Hypertext Transfer Protocol) to serve web pages to browsers. HTTP is the rules for transferring web data.
Web servers provide the World Wide Web to clients.
Apache2 is the most popular web server software and part of the popular LAMP stack.