An excellent article at Roachfiend.com explains how to create your first extension from scratch. Since every programmer always learns from the famous Hello, world! example, he explains it in a good way to introduce you to developing extensions.
helloworld.xpi is the packaged extension. XPI is just an file format that your browser will recognize as a browser extension. In reality, it’s just a zipped up file. So you can rename the XPI to ZIP or even JAR if you want, then open it up using an archive program, like 7-Zip or WinRAR. So, once that’s opened up, you’ll see:
A folder and two files. install.js was all you used to need for the installation, but now that the extension manager has changed (since Firefox 0.9), the install.rdf is used instead. Now, the install.js is used purely for earlier versions of Firefox/bird, Mozilla, and Netscape. If you want to make this extension solely for 0.9+ versions of Firefox, then you can omit this file if you’d like. I tend to keep it in because it only take a second to make, and assures a wide audience compatibility. Read more on how to make extensions in his article …