You'll want to at least look at chapters 1-2 of [Roman Maeder's *Programming in Mathematica*][1] for starters. That was the walkthrough I used when I was starting out with package writing. I'll update this answer if I can remember the other references I used.

 [1]: http://books.google.com/books?hl=en&id=-I0oAQAAMAAJ