Adafruit has a tutorial on infrared sensors: Overview | IR Sensor | Adafruit Learning System.
Here is another tutorial: http://www.sbprojects.com/knowledge/ir/index.php.
There is a library on github: GitHub - Arduino-IRremote/Arduino-IRremote: Infrared remote library for Arduino: send and receive infrared signals with multiple protocols.