The TCRT5000 is an IR sensor unit.
It has both a Photodiode and a Phototransistor coupled in its package.
The photo diode has two pins (Anode and Cathode) which can be used to
generate an IR signal. Similarly the Photo transistor also has two pins
(Collector and Emitter) which can be used to read the IR signal that is
reflected back. This sensor can be used to detect the presence of object
or any other reflective surface in front it, also with some level of
programming it can also calculate the distance of the object in front
it. But the distance can only be calculated for short range objects and
is also subjected o environmental disturbance. So if you look for a
sensor to measure distance of an object in front of it you should try
the HC-SR04 Ultrasonic sensor.