The resistor at the base of the transistor up top acts as the photoresister. The LED after the diode up top acts as the IR LED.
In this Project the proximity sensor activates a higher voltage circuit connected to the same power supply.
—-
The closer an object is to the IR photoresistor, the less resistance it has because the IR LED is bouncing back into the photoresistor, allowing a flow of electricity to the base of the BC547 transistor at the top, having the circuit to the LED to be completed as well as the higher voltage circuit it is controlling.