Sonar is a system that transmits and receives sound waves underwater in order to locate submerged objects, such as submarines, or detect the distance to the coral reefs and other underwater obstacles.