Data is retrieved from the web server, which gets it from the game server. One nice consequence of this is that load on the web server has no effect on the in-game performance. The current setup has a time delay, where the web server has snapshots of the game behavior. The current settings are:
Messages are updated every 20 seconds. Uptimes, player data, and quests are updated every 60 seconds. Market data is updated every 120 seconds.
Note that for messages, if no messages on any channel have been posted, it doesn't update anything on the web server. Somewhat related, the guild static pages are only generated when activity happens.
Note that the guild message logs are password protected, are only set up for guilds that request them, and only have inter-server messages. That is, if you say "/g I really wish PersonX wasn't in the guild." it does not go into the message log. If you use "!guild" it goes out to everyone. Some guilds use this to announce runs, knowing that even people not logged into HG can see the message.
messagelog.xml is the global message RSS feed.
xdata.xml. This is of particular importance for tool writers. This XML file contains all meta, user, and messages for all public channels for the last hour. Tools that do more-or-less real time updating are encouraged to use this. It's basically everything going on on the servers in the last hour, except market data.
XML of all data except market, 12 hours worth of data, limited to 100 messages per channel. This is a pretty good way to initialize an app that wants to display HG data, which will then make calls to get the static xdata.xml afterwords for updates.