The keyword "localhost" always refers to the computer you're working on. So if you type http :// localhost on a computer, the browser detects the IP of the computer you type that on and tries to connect to a web server on that IP.
So of course when you go to another computer and type localhost in the browser, it won't work because you don't have a web server installed and configured on that computer.
My advice - like others already told you - would be install one of those all-in-one packages that include Apache, PHP and other things. XAMPP comes to mind, but I'm not sure if that's the most relevant these days.
When you gain some experience (or if you feel like doing it), you can edit Apache web server's configuration file manually and configure the web server as you wish. Just don't forget to restart the Apache server from Windows services so that Apache will re-read the configuration file.
You'll also have to be careful to allow the web server service in the firewall (for apache, it's httpd.exe) and you also have to be careful about what other programs may run on your computer - for example, sometimes programs like Yahoo Messenger or Skype start faster than the web server and reserve the default port (80) for their own use, making the web server fail to start. They do this to get around blocks and other restrictions.
To connect to your website, you'll need to figure out the IP of the computer (either internal or external) and then type http :// ip in the browser. You can find the local ip in Network and Sharing Center in Windows 7, you have there Local Area Connection and after you click on it you can then hit the "Details" button and it tells you the local IP. alternatively, start > run > cmd> ipconfig
The external IP, you can easily use websites to tell you that. I often use
http://ping.eu cause it's easy to remember.