Sonar is a device that uses ultrasonic waves to measure the distance. it stand for SOund NAvigation And Ranging.
Sonar consist of a transmitter and a detector and is installed in a boat or a ship. The transmitter produces and transmit the ultrasonic waves. Theses waves travels through water and after striking the object on the seabed, get reflected back and are sensed by the detector. The detector converts the ultrasonic waves into electrical signals and are appropriately interpreted.