If you're talking about on a LAN, then look into zero configuration
(service discovery) and multicasting
. Unfortunately I'm not that familiar with network discovery beyond the basic concepts so you'll have to do some research.
If you're talking about the Internet, then a centralized server that keeps track of user run servers is probably the best way to go since broadcast packets aren't generally routed outside of the local network and service discovery was never meant to support a network on the scale of the Internet. You can keep it pretty simple and implement it using a database and your favorite web scripting language.
Generally a client hosted server would publish it's availability to your central server and the central server would record the client hosted server's address along with a "last contact time" entry in the database. The client run server would periodically "ping" the central server to let it know it was still available with the central server updating the "last contact time" field to the time stamp of the "ping". When a game client connects to your central server, the central server sends back a list of client hosted servers that have "pinged" within a certain timeout period. Any that haven't are simply ignored and not sent sent out by the central server. If your central server gets a lot of traffic, set up a Cron job to delete expired entries from the table at a set interval.