I have often been asked this question. The config database holds all the information that a SharePoint installation needs, e.g., "Where are the SharePoint databases stored?", "Does the installation have a separate index/job server, and if so, what is the name of this server?", etc. However, before a SharePoint server can connect to it’s databases, it needs to know where the config database is held. Well as you might expect – the dsn definition for the config database is stored in the registry:
WSS 2.0 and SPS 2003: HKLM\Software\Microsoft\Shared Tools\Web Server Extensions\Secure\ConfigDb
WSS 3.0 and MOSS 2007: HKLM\Software\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\ConfigDb
[Updated 20/10/2006 to add Microsoft Office SharePoint Server 2007 and Windows SharePoint Services 3.0 registry entry]