Underwater detector World War 2?

A Hydrophone, which is a waterproofed microphone, is used to detect sound waves in the water. This passive system was used to listen for enemy ships and submarines.

SONAR was used as an active system, in quite the same way as radar, emitting a pulse of sound, and listening for the return echo. Naturally you will let the enemy know you are there!