Reflective IR Sensor with 470 and 10K Resistors is a simple plastic casing with two elements - an IR LED and an IR phototransistor. You can control the IR LED and turn it on to bounce IR off objects to determine their reflectivity. White & light colored stuff will bounce the light, so you can detect it. Black & dark colored stuff will absorb the IR light so that it isn't detected. Likewise, if something isn't in the way of the sensor, it won't trigger either.
Reflective IR Sensor with 470 and 10K Resistors is handy when you want to detect if something has passed by the sensor, or a very simple hand-detector. Also sometimes these are used as rotary encoders, if the encoder wheel has black and white stripes, the photo sensor is fast enough to tell you the RPM.
Reflective IR Sensor with 470 and 10K Resistors comes with a 470 ohm resistor (for biasing the IR LED) and a 10K resistor which you can use as a pull-up resistor for the phototransistor. The sensor is breadboard friendly and easy to solder to.
Reflective IR Sensor with 470 and 10K Resistor works best when detecting a light-colored object approximately 5mm away - 2mm to 10mm worked fairly well but your results may vary with the LED brightness, object shininess, etc.
Adafruit Web Site: https://www.adafruit.com/products/2349