IR sensors are usually housed in some nice casing to get optimal performance and it will be on a PCB with a standard output connector. Rarely do we see how these things actually work. This project write-up shows how a basic IR range sensor works using 2 LEDs (IR Transmitter/Receiver).
PyroFactor: