Ultrasonic sensors send out sound wave through the transmitter and receive back the sound wave by a receiver.The sensor will determine the distances. Normally ultrasonic works in pair to get more accurate value.
Infrared Sensor is also known as IR sensor.IR Sensors will send an infrared light and reflect on an object, and the receiver will detect it.
Cobra sensors shine a line of IR reflective sensor. it is used to detect a line. It can be used to either stop at the line or follow along the line.