This is a reflective sensor that includes a photodiode and phototransistor. The photodiode emit IR light and reflect from objects in front of the sensor, the reflected signal trigger the phototransistor and send signal to Arduino. The amount of trigger is determined by many factors such as distance, surface reflectivity, and the color of the surface. You can use this sensor to perform a path following robot, or you can use it as a positional sensor for shaft encoder. It can detect between 1mm to 25mm.