According to the Favicon article at Wikipedia, the graphic should be saved as an ICO file (although newer browsers support any graphics format), and inserting the following code in the HTML should make it appear:
Additionally, the article says the server should be configured to send the correct MIME type for ICO files, image/vnd.microsoft.icon or image/x-icon, but I'm not sure how to do this, and I don't think it's necessary. In fact, if you look at the favicon for this page (this post only) in IE7, Firefox, or Safari (and maybe other browsers, but not IE6, if I understand it correctly), you *should* see the image that Jim Fitzgerald linked to (because I put the code in this post, and the page doesn't care where the code is, even if it's in the post).
The Wikipedia page provides more detail and links.