At its base the Internet and most network structures use a rigid hierarchy of network nodes, domain names, and DNS servers to ensure that "http://about.com" reconciles to 207.241.148.80. The multi-level, interdependent DNS servers ensure that the DNS listings are updated every 24 hours or so.
In a peer-to-peer model, the same basic dynamics are at work. One computer functions as a client, another as a host, and a database whereby the location of the host (i.e., its IP address) is made known to the client in some way. With that IP address, the computer that functions as a client can contact the host directly using a procedure similar to that of a basic web client.
The de facto host application simply sits on the remote computer, watching a port and and waiting to be contacted. It could be part of a larger application that also includes client-like functionality. The point is that, like the interaction between a web server and a web browser, traffic is sent on a given port, and all traffic received by that port is processed by the same application.
