A photoelectric cell consists of a transmitter and a receiver. The transmitter sends the infrared beam to the receiver. If this beam is interrupted, the photoelectric cell sends an action to an installation. 

For example, the controller of a door or gate opener, so that it stops in good time if someone is standing in the entrance.