Sonar (originally an acronym for Sound Navigation And Ranging) is a technique that uses sound propagation (usually underwater, as in submarine navigation) to navigate, communicate with or detect objects on or under the surface of the water, such as other vessels.
The ultrasound waves are allowed to pass through metal block to which are fitted detectors to detect the waves. If the metal block has a very small defect, such as an air bubble or a crack, then the ultrasound waves are reflected from such spots. The reflected ultrasonic waves indicate that metal block is defective.