When you are going to somewhere using a browser and specifying a port, you are attempting to make a (TCP) connection to that port.
When you run a service (like a web server for example), it runs on a specific port. If you try and connect to a machine and there is no program running associated with that port (the correct term is bound to the port), or it is firewalled, then it will time out.
When you went to Google on port 8000, there was no service running on it, so it timed out. (It actually tries to connect a few times incase there is an error the first few times to make things more robust)
When you went to Google on port 443, you successfully made a connection, because 443 is typically used for HTTPS - ie secure connections. Because you did not initiate a secure connection as per the HTTPS protocol, you had Chrome and Firefox behave that way.
When making a connection on TCP, there is a "3 way handshake" - The client sends a "SYN" packet to the server. The server receives this, and them assuming there is a program running, it sends back a "SYN-ACK" acknowledgement, then the client sends an "ACK" packet to the server - at which time the systems have established a connection.
In the case of connecting to port 8000, the client does not get a response to the SYN packet, so it tries a few times, and then gives up and times out.
In the case of connecting to port 443, a connection is established at the TCP level. At this time the server expects to negotiate an SSL connection for security (because its configured to do so on port 443). You don't know how to speak SSL, so it failed.
If you have TELNET installed - most systems do , you can pretend to be a browser (or a mail client or whatever if you know the protocol), by doing the following.
1. type "telnet www.google.com 80"
(wait for a few seconds)
2. Type GET / HTTP/1.1<enter>
Step 1 tells Telnet to create a TCP connection to Googles server on port 80, and step 2 Says what to get (GET / means get the root file), and the line "host" says what server you are wanting to connect to - you need this because a lot of websites share a single server - the second line tells the server which site. You press enter twice to say you are finished sending your header, and then get back an HTTP response. (If you were a web browser, you would send a lot more information, including the browser details, cookies etc - but for explanation purposes we did not do this.)