It comes down to which game you are hosting.
For Valve titles, the company ships dedicated server software you can download and run yourself — that is the standard route for Counter-Strike, Team Fortress and the rest. Other games vary; some include a server binary, others do not offer one at all.
If you would rather skip the setup and maintenance, renting a preconfigured game server from a hosting provider is the simpler option.