How to receive IR signal in PIC18F
Here's a good introduction to IR reception. It's aimed at Arduino, but the concepts are all applicable to any microcontroller.

IR detectors are little microchips with a photocell that are tuned to listen to infrared light. They are almost always used for remote control detection - every TV and DVD player has one of these in the front to listen for the IR signal from the clicker. Inside the remote control is a matching IR LED, which emits IR pulses to tell the TV to turn on, off or change channels. IR light is not visible to the human eye, which means it takes a little more work to test a setup.
In this tutorial we will show how to

Test your IR sensor to make sure its working
Read raw IR codes into a microcontroller
Create a camera intervalometer
Listen for 'commands' from a remote control on your microcontroller