First makes sure that your computer is running and that your router is connected to a modem and both are running and turned on.
Go to the website above the address is on the top. Then download the latest version of minecraft server.
Make a folder for the other files this will create. This can be any name.
Run the jar file until it says done. Then run the command "stop" in the text box on the bottom right.
Go in the eula file and replace false with true. And save the file and close.
Should end up like this folder. So make a text file
Enter "Java -Xmx1024 -Xms1024 -jar minecraft_server.jar nogui" for more ram replace the "1024" numbers. 1g is 1024, change for how many gigabytes you want. More is helpful.
Save the run.txt as a .bat file with save as.
Open command prompt. Can find it with searching cmd on Windows. Enter ipconfig and server for default gate way. Copy/type this into your internet browser.
Once login to your router find the port forwarding tab.
Enter your port default is 25565 for servers. Lay out is different on different routers. Your IPv4 ip is on the command prompt and some routers have is already on the page on it. Make sure to save!!!
Always save! To change ports you can find it in the server.property files and at server port.
Now you have set up port forwarding and can give friends/people your ip and run the run.bat file to play. You can find your ip by searching on the Internet, what is my IP address.