If an application wants to offer a certain service, it attaches itself to a port and waits for clients ("listens on the port"). A client that wants to use this service allocates a port on its local host and connects to the server's port on the remote host.
A port is identified by a number from 0 to 65536; numbers 0 to 1024 (well known ports) are reserved for particular applications.
Once a connection has been established, another copy of the server program may attach to the server port and listen for more clients. In this way, there can be several concurrent web connections to the same host all using the same port. TCP is able to tell these connections from each other, because they all come from different ports or clients. For example, if you open two web sessions, the first session will use client port 80, and the second one will use client port 81. Both however, will connect to the same port 80 on the server machine.
A URL can specify a non-standard port number to be used; for example, http://browse.lyrics.astraweb.com:2882/. This usage is very rare, however, and client machines may actually block access to such non-standard port numbers to avoid problems with malicious sites.
In Windows, you can use the netstat command to see which ports are active or being listened on. For information on options, enter netstat /? at the Command (DOS) Prompt.