What Is A Server?
A server is a computer that runs software that serves up content on request. The hardware and software components of it are called, unsurprisingly, "server hardware" and "server software" when we want to be specific. Each server hardware can host multiple server software.
We all know on some level that servers are a thing. Most of us are probably only consciously aware of the servers' existence when they go down and the website or app they serve is unusable.
People that play multiplayer games will have heard of servers. Some games, like Genshin Impact or Paladins, have servers in different geographic locations, so that you have a smooth, low-latency (aka low-ping) connection to the server, each server containing multiple instances of the game for players to play separately. Other games, like Minecraft, have one instance of the game per server.
Those that have played a game with a dedicated server software will know, any computer can be the server hardware. For example, to run a Minecraft game that you can play together with others in the same local network, one would download the server software onto their computer, change whatever settings they want in the properties file, start the server software, and then connect to it using the Minecraft game.
The software that connects to the server - the Minecraft game in this case - is called a client.
Can I Have A Server?
Yes, just go grab a computer! Download and run whatever server software you want on it!
Okay But Can I Have A Server That's Always Online?
Fair question.
First you have to find a computer that's always online. If that's your desktop computer, it could be considered a waste of electricity but who am I to judge? It it's an old laptop that's perpetually plugged in, sounds great. If you use an old phone perpetually plugged in running Termux, that is… why are you even reading this? Come help me write!
But let's look at some more common options.
Cloud Computing
You can go to a cloud service provider like Amazon, Google or Oracle (Oracle has a decent free tier btw) and create a machine.
The only hardware detail to keep in mind is CPU architecture. There are two types - x86_64 (sometimes lazily written as x86 or referred to as Intel) and aarch64 (sometimes written as arm64). These are two different types of CPUs, the former being optimised for performance and the second for power efficiency. A lot of software isn't compatible with aarch64 CPUs, so it is safer to go for x86 CPUs.
You will be asked for storage and RAM requirements, and then an OS to install on it.
On-prem Computer
You can buy a computer to place in your home.
Professional grade server hardware are called rack units, because they're meant to be installed in racks. You might've seen a glimpse of them if you've looked at a server room in real life or in movies.
Hobby server hardware… popular options are mini PCs or microcomputers. Mini PCs tend to be x86 architectures, while microcomputers tend to be aarch64 architectures. You will likely need an external monitor and keyboard to install an OS on a mini PC, but typically not for a microcomputer.
OS To Install
Usually, some version of Linux Server. Microsoft Server might also work but I cannot give any tips on that.
When you install a server OS, it comes with no graphical interface - you only get a command-line interface. If you don't know what it is, imagine a stereotypical hacker in a movie. You can access the computer via a connection called SSH.
You will need to get comfortable with a UNIX-style command line, so I'd recommend working on it. If you have a Mac, you have it pre-installed, but you have to be really careful. If you have a Windows computer, WSL is a really good sandbox for you to fuck around without running the risk of finding out too hard.