Incase you don't know, a dedicated server is run on a machine that is strictly for running that server and not actually playing. Dedicated servers are often permanently running and can be hosted personally or commercially.
Some people who have an "extra" computer at home might choose to make a dedicated server out of it. They will install the dedicated server application onto the steam platform. From there, they will connect the server to their LAN and open router ports for the server to be broadcast to the Steam server list. It's generally good to use a machine that doesn't have many applications running, to reduce computer lag. Surfing the internet, using aim, running norton scans and so forth on the same computer are no-no's when running a dedicated server. The fewer the applications = the more resources that can be used for the dedicated server.
Also note that broadband servers are ideal compared to dial-up, as you will be having several connections from other players coming into your computer at one time.
The most common type of server is the listen server, which you make and play on at the same time. This type of server is ok for having a few people play around when other servers are full or if you just wish to run a LAN game with your friends (no internet connection needed). These servers aren't as stable as a dedicated server because you are playing at the same time the server is running. As stated above, if you choose to run this type of server, make sure you are not running aim and that no virus scans are planned during your playing time. Its a good idea to keep the game running on your computer at all times. Minimizing to the desktop is not a good idea because you will induce the computer into handling more tasks and will probably cause mild freezing spells to the players of your server.
Now that you know which you will be running, let's get started!
For a dedicated server, you are going to need to open port 27015 on your router if you have one. You will also need to re-route or deactivate any firewalls currently running on your machine. Find the Server.cfg file (found in esf folder-open with notepad) and add the line sv_lan 0. Its also helpful to change the server name in this file, from "Earth Special Forces" to something more unique so that your server is easily found in the list. You have the choice of either running Steam's dedicated server that has a user-friendly graphic interface and menu by choosing "Dedicated Server" from the games list, or running HLDS, which is a DOS application. The major advantage that I have seen by running HLDS is that you can use programs like ServerDoc to automatically restart your server if it crashes.
I am probably leaving something out, but this is the general setup of a dedicated server.
For a listen server, do the same with the router port forwarding as spoken for the dedicated server, and make sure any firewalls will either allow ESF to run, or are turned off while you are running ESF. This time, open the listenserver.cfg file (found in ESF folder) and change sv_lan 1 to sv_lan 0 or add sv_lan 0 to the end of the file if there is no entry for this cvar. This opens your server to the public so others may join from the server list. Changing Hostname from "Earth Special Forces" to something else is also helpful in identifying your server. Save this file. Open ESF normally and choose Create Game. Pick your map from the menu and select any other options like free-for-all fighting or team duels. After this, hit create game. During this time, your game will be loading and the server will be broadcasting to the server list. When you have entered the game, this indicates that you have successfully created a listen server. However, this does not guarentee that others will be able to join. Have a friend help you test if he can join your server. If he cannot, then it usually means you didn't correctly forward port 27015 (half-life port), you didn't turn off your firewalls (including Windows firewall in some cases), or that you made a lan game and you need to enter sv_lan 0 into your console (shouldn't be the case if you did this in the .cfg file)
There are also alot of answered questions that you might have later on about this as well, so searching for them in this forum section might help you alot. I've probably answered a dozen of these questions in the past year, so I know this thread has been created by others with similar answers.