PID is implemented when a precise way is needed to drive an external device that provides feedback. Heaters with temperature sensors, and servo motors are examples where PID is used.
This app note by Microchip gives instructions how to implement PID control in PIC18 projects. Basic terms are explained inside the document as well as algorithm flow charts to understand how PID is implemented. Microchip has also provided assembler source code to go with this app note. [via]
App note: Implementing PID on PIC18 microcontrollers - [Link]