It's complicated, i have run servers for years, and it depends what you want.
The basic minecraft server is a vanilla server. A vanilla server comes with default commands /op etc.
Setting up a vanilla server & port forwarding.
You can go to www.minecraft.net/download and download minecraft_server.jar, after the download has completed make a folders for your files to go into, after you have put the .jar file into a suitable folder, open it, the file will automatically create files etc "world" for the default world.
You can connect to this server by going into minecraft and the ip would be: "localhost" without the "", this is because you have not port-forwarded it so only you can connect.
There is now 2 ways you can have people join, the first is the easiest.
hamachi is a programme which link computers into a network, allowing you to have connection between the computers. To download hamachi go to: https://secure.logmein.com/products/hamachi/download.aspx, after you have downloaded it you need to open it, run the install etc. After that you need to create a hamachi network, (i use a mac so i dont know how on a windows) you should soon find it, create a network with a suitable name and password. After you have done that your network is live! The next thing to do is look at your hamachi ip, it's next to your computer name for hamachi. You need to paste that ip address into your server.properties file in your minecraft server folder. (there is a part asking for the ip) After you have done that, start up your server and try to connect it with your hamachi ip. If it works, then get your friends to download hamachi and join your hamachi network. Unfortunately the free version of hamachi only lets 5 people in each network so this way isn't entirely efficient.
2. Port forwarding
Port forwarding is forwarding your router to the world wide web. Of course everyone has different routers so the methods are different, for me, i have a belkin one, and a BT Infinity Hub (i use the belkin one). So i cannot help you with any other router than belkin, you can always search it up on youtube.
Now if you're not happy with a vanilla server you can always try bukkit! Bukkit is basically a minecraft mod for servers,(though any minecraft client supports it), bukkit is a more advanced version of a minecraft server, it replaces vanilla, it introduces a world of plugins (mods basically), etc, permissions, ranks, all of that. Since i use a mac i cannot help you with setting up a bukkit server on a windows because it involves a few programmes i dont have. To download bukkit go to https://dl.bukkit.org/downloads/craftbukkit/ and download the version you want, replace this with your minecraft_server.jar and then watch this video, note that i have directed you the first few steps: https://www.youtube.com/watch?v=ZJemoIomYiw
Thanks for reading! Took me bloody long to write it aha. I hope you enjoy and if you have any questions just reply to this. At the moment i do have my own minecraft server, it's bukkit, 1.7.9 ip: 18.104.22.168:25765 go have a look! Bai