A server is a program, or the machine running it, that waits for requests from other programs and sends back a response. When you open a web page, your browser sends a request and a web server answers it with the page. That request-and-response loop is the entire idea. The word server names a role rather than a specific kind of computer, and in 2026 servers run everywhere, from massive cloud data centers down to the laptop a developer uses to test code locally. Understanding the role makes the rest of web technology far less mysterious.
What a server actually is
A server does three things in a loop: it listens for incoming requests, processes each one, and sends back a response. The thing making the request is called the client. This pairing is the client-server model, and almost all of the internet runs on it.
It helps to separate two meanings of the word. A server can be a piece of software, like a web server program, or a piece of hardware, the physical machine it runs on. One machine can run many server programs at the same time, each handling a different kind of request.
| Sense of the word |
What it means |
| Server software |
The program that listens and responds |
| Server hardware |
The physical or virtual machine it runs on |
| Server role |
The responder side of a client-server exchange |
How the client-server model works
The client starts the conversation by sending a request, usually over HTTP, addressed to the server IP address. The server, listening on a specific port, receives it, does whatever work is needed, and returns a response. Then it goes back to waiting for the next request.
-- A client (curl) sends a request to a web server
curl https://example.com/about
The server on the other end receives that request, finds or builds the page, and sends it back with a status code. Your browser is doing exactly this many times to render a single page, pulling text, images, and scripts from one or more servers.
Common types of servers
| Type |
What it serves |
Example use |
| Web server |
Web pages and assets |
Loading a site in a browser |
| API server |
Data for apps to consume |
A mobile app fetching your profile |
| Database server |
Stored data on request |
Saving and reading records |
| File server |
Files over a network |
Shared documents in an office |
These are roles, and one program or machine can play several. A small project might run its web, API, and database servers on a single machine, while a large service spreads each across many. The labels describe what is being served, not a different category of computer.
How to think about servers as a beginner
- Picture the loop. Listen, process, respond, repeat. Everything else is detail.
- Remember it listens on a port. A server waits on a numbered channel; clients connect there.
- Run one locally to learn. Most languages can start a development server in a few lines, no special hardware needed.
- Separate software from hardware. When something is slow, ask whether it is the program or the machine.
- Know that the cloud is still servers. Cloud hosting is renting someone else server hardware, managed for you.
Common mistakes
- Thinking a server must be special hardware. Any computer can act as a server, including your own laptop for testing.
- Confusing the server with the website. The website is the content; the server is the program delivering it.
- Leaving a development server exposed. A local server is meant for testing, not for the open internet without protection.
- Ignoring the port. A server can be running yet unreachable because nothing is connecting to the port it listens on.
FAQ
Is a server hardware or software?
It can be either, depending on context. The software is the program that responds to requests; the hardware is the machine running it. One machine can host many server programs.
What is the difference between a server and a client?
The client makes requests; the server answers them. Your browser is a client, and the web server it talks to is the responder. The roles are defined by who asks and who replies.
Can my own computer be a server?
Yes. Running a development server on your laptop is common, and you can reach it at localhost. Exposing it safely to the internet takes extra setup.
Does a server need to stay on all the time?
A production server does, so it can answer requests at any moment. A development server only runs while you are working, then you stop it.
Where to go next
See what a port is in 2026, what a client is in 2026, and what a REST API is in 2026.