While you can host a game server on your computer, it is sometimes easier to have a cloud server running 24/7. Game server hosting can be surprisingly cheap, especially if you are just looking to play with some friends.
Dedicated vs. Shared Hosting
Dedicated hosting is when you rent a whole rack on a server or often, part of that racket's resources. You often get detailed specifications about what you exactly buy, and you usually pay a little extra compared to shared hosting.
Shared hosting runs multiple instances of a game server across multiple server settings, allowing web hosts to save money and provide a low price. However, it is not always clear what specifications you get and you can run in traffic problems if your server suffers from heavy load.
If you want to install a server for you and a couple of friends we recommend you save some money and get shared hosting. If you want many people playing on your server, you should try to share hosting first and upgrade to dedicated hosting if necessary.
Depending on which provider you purchase your server from, you can also get managed hosting which is when the provider builds tools to configure, configure and manage your server automatically, such as automatic restart and easy mod installation.