I connect to my minecraft server?

I set up my minecraft server using a tutorial on YouTube, and everything works fine. So after I start the server, and go to direct connect on multiplayer, I type in the server ip box "localhost" and I get this message: java.net ConnectException: Connection Refused: no further information: and when I type in my own server ip, it comes up the same, except it says connection timed out. Can someone tell me what's goin on? Also i'm real bad with computers so please say it in English.

Try using 127.0.0.1
It's the alternative for localhost. Also have you port forwarded port 25565 for TCP and UDP? Also if you're using Windows, have you made exceptions in your firewall for this port and along with… Well uhmm I'm a linux user and forgot the last part.