Bookmarklets are javascript code you execute in your local browser. They are basically a bookmark where the link is javascript prefaced with "javascript:"
javascript:alert("Hi, I'm a Bookmarklet!");
They run in the browser in the context of the current page.