A new tutorial covers the basics of programming a PIC with a PIC programmer supported by MPLAB, like a PICkit or ICD. This frequently-requested tutorial is geared towards programming the bootloader into a project like the Bus Pirate.
Bootloaders make it easy to upgrade firmware without dragging out (or owning) a programmer. Just activate the bootloader and upload new firmware over USB. If you’re starting with a fresh chip though, or you’ve got bricked hardware, you need to get the bootloader into the chip with a programmer.