You must refer to the datasheet.
Sleep is achieved with the SLEEP instruction. But you have to make sure you can wake the PIC back up. Any interrupt that can be triggered during sleep can wake a PIC up. Edge interrupt, IOC, comparator, WDT.
For starters, you must enable global interrupts. And then you must enable w/e interrupt you are going to use to wake the PIC, whether IOC (interrupt on change) or the interrupt on edge (usually on the counter pin). You will have to refer to the datasheet, because there may be multiple special registers that have to be set to turn on the interrupt.
To use interrupts, you have to service them. This can get complicated, if you haven't used them before. Before you sleep, you have to make sure the appropriate interrupt is enabled, so that the PIC can be woken. And you also have to make sure the interrupt flag has been cleared, else the PIC will likely just wake right back up, immediately. (In PIC, the interrupt flag is usually always set by that action, whether the interrupt is enabled or not). Upon wakeup, the ISR will be triggered, and you must service the interrupt in your interrupt service routine. And finally, you must make sure to avoid a read-modify-write error in the case of a IOC interrupt. You can avoid this by doing a read of the port before you clear the IOC interrupt flag. Check datasheet for more info.
Super important:
Now, just in case your program is over 1 page long, be sure the first command in your ISR is a pagesel $. I don't know why, but some of the PICs that even have automatic context saving still don't freaking handle this, automatically.
If using just this one interrupt for wakeup, then your ISR doesn't need to be fancy. Just disable the interrupt in the ISR and then RETFIE. Making sure to enable the ISR and clear the flag before SLEEP. But if you want to do it "proper", your ISR should check to make sure the interrupt is enabled and also check that the flag is set before servicing that interrupt. Because if you are ever using more than one interrupt, you will have to do this to see which one must be serviced. When using just one interrupt, you automatically know both these conditions have been met.