Fishing boats and submarines use SONAR. The idea was borrowed from the navigation systems of bats, which can’t see in the dark so they use echolocation of sound to work out where they are. There’s a species of dolphin which also uses echolocation in the murky waters of the Amazon, where the visibility is poor.
Unlike a submarine, a fishing boat floating on the surface emits a sound pulse from its keel and listens for its return. Most of it will reflect off the ocean floor but some of the emitted signal will return to the boat. If we know the speed of sound in sea water (we do, it’s 1482 m/s, dependent on saltiness – whales sing to each other over vast distances) we can work out how deep the water is. Alternatively, if the sound wave is scattered off a shoal of fish, some of the sound energy is reflected back to the boat in a shorter time, thus giving the fishermen information about how deep the shoal is, also how big it is and how fast it is moving. Here’s a simple calculation. If the time between sending and receiving the signal is 0.02 s (doesn’t seem a lot, but easy to measure electronically) and the speed is rounded up to 1500m/s, distance there and back is 1500 x 0.02 = 30m. The water is therefore 15m deep at this point. Remember, the intensity of the reflected signal will be much less than the incident signal because a lot of the energy will be scattered in all directions – a diffuse reflection in other words, and only a small fraction will be reflected back up to the boat.
A similar trick using radio waves was developed just before WW2 to track aircraft, which turned out to be quite useful. It’s called RADAR