Gnutella servents (SERVer and cliENTs), such as CocoGnut, find other servents on the Gnutella network to connect to. When another servent is discovered, a connection is made and the two servents talk 'Gnutella' to each other. These other servents are known as Ultrapeers and allow around 100 leaves to connect to them. These Ultrapeers connect to other Ultrapeers with other leaves, which makes a losely knit, two-tiered network of Gnutella nodes.
When a leaf connects to an Ultrapeer, it sends a hash table which essentially contains the words which correspond to the names of files that the leaf is sharing. When you send a search, a Query message is sent to all the Ultrapeers you are connected to. These, in turn, will forward your query message to any leaves that potentially hold the file you are searching for. When another leaf receives this Query, it will check to see whether it has the file, and if it does, a QueryHit message will be sent back, through the Ultrapeer, to reach your node.
When you receive a QueryHit message, it will be displayed in CocoGnut's search window. From there, you can select what file, and from what node, you wish to download. CocoGnut will attempt to connect directly to this computer and a download will take place. This is a very simplified view of the Gnutella topology. For more information, see Gnutella For Users.