A bookmarklet is a bookmark whose URL (web address) contains a small program that does something useful with the currently displayed web page. To execute the program, you click on the bookmark.
javascript:alert("hello")You can click on the link to execute it, you can also add the link to your bookmarks bar.
Update 2011-06-08: Implementing bookmarklets in JavaScript