An infrared (IR) proximity sensor consists of an IR LED as a light source and a photo-transistor as detector. The IR LED transmits IR light which the photo-transistor can pick up. With more IR light on the photo-transistor, it conducts better. In other words; both collector-current and emitter-current will increase. Using a resistor in series with this photo-transistor (either in series with the collector or in series with the emitter), a voltage drop can be detected that is proportional to the IR light intensity that falls on the sensor.
Typical type number of this kind of sensor is TCRT5000 and CNY70. The default operating range of these sensors is 1 to 20mm. This is enough for typical applications in Multi Functional Copiers or vending machines. But we have a tutorial on how to increase this distance. Read one of the tutorials on how to apply this sensor. Or read the datasheet and learn that the typical forward voltage is 1.25 Volt (Holds for almost any Infrared LED).