This is a Sharp GP2A200LCS0F reflective photointerrupter. As opposed to a standard direct photointerrupter which directly senses transmitted light aimed at it, this one operates on reflected light. The emitter and detector are placed in the same direction and it is used to detect reflective objects. When a reflective object is close, the emitters output will reflect off of it and hit the detector. The detector will then output a pulse to signal an event.
This type of device can be used in industrial settings where reflective objects pass in order to count them. However this particular device is extremely popular in the robotics community for making line-following robots. Black lines of tape are placed on a white floor and this sensor is used to detect the boundaries of the line and to track it.
Note: This device requires a 3-pin JST connector pigtail. I'll be adding it to this product once I get the connectors in stock.