In general, ultrasonic sensors are sensors that make use of the characteristics of high-frequency sound for a range of applications such as distance measurement, non-destructive testing of materials, or medical applications.
For distance measurement, a typical ultrasonic sensor uses a transducer to periodically send out ultrasonic pulses in the air. These pulses get reflected from objects in the detection area of the sensor and are received back by the sensor. By measuring the time it takes an ultrasonic pulse to travel to the object and get reflected back to the sensor, the distance to the object can be calculated. This principle is called time-of-flight measurement.