how http://blockchain.info/, http://blockexplorer.com/q or http://www.bitcoinmonitor.com/ works
They monitor the public blockchain from multiple Bitcoin servers. There's a very simple rule for which chain is valid -- whatever chain has the most work is the valid one.