These are Infrared IR Transmitter and Receiver (Photo-diode) Pair used generally for object detection. It can be used for line following, edge avoider and obstacle detection DIY robot.
IR LED emits light in infrared region, which is invisible to human eyes. It is a high-intensity diode packed in water clear plastic package. It makes a pair with IR photodiode.
The photodiode is a type of Diode but different from the LED. It does not emit any light but detects the presence of light. This diode allows some current to pass through it after detecting light and the amount of current flow is directly proportional to the amount of light detected, so it is called IR receiver and makes a pair with IR transmitter.