Ultrasonic waves are emitted by the sonar transducer, they travel through water, reflect off objects (like submarines, fish, or the seabed), and return to the transducer. The time taken for the echo to return is used to calculate the distance to the object.