Bit of a vague question They use the Facebook API to communicate between a developer's host and the Facebook server (where they can have PHP code and databases to store application information - like a "blog" widget would store all the blogging data on the developer's server) There's a big load of info about this on the Facebook site itself, in the "Developers" section (a link at the bottom of the page, if I remember correctly)
Does anyone have a link to a simple widget using the Facebook API? I'd like to see how someone went about this.
http://developers.facebook.com -- browse around and you should be able to find an example of how they created a simple one. The potential behind these things is AMAZING!