Why do you want to buy a server? When you can have a hosting company host your site for very little money. Let the hosting company worry about all the problems of running a server.I use Bluehost, Domain names are 10 dollars a year and the hosted site is less than 10 dollars a month. The hosting company come with a lot of free services, that are part of the package.
Most servers are Linux and run command-line. So you would need to know Linux command-line first. But if you want to play around with servers an old PC will do and you can down load the Linus OS for free.
al