Type your answer here... ASDIC
Due to their short ranges, ultrasonic (>20khz) frequencies aren't used for ship or submarines' primary Active Sonar systems. Though the actual frequencies used are classified, I can say that they're nowhere near the ultrasonic range. Submarines do employ ultrasonic frequency detection systems that are passive sonar based, but they're primarily for detecting active sonar from homing torpedoes. They're also annoying for detecting any bottle-nosed dolphins in the area when you're at Periscope Depth.
By an electronic device called 'sonar' .
They were used by submarines to navigate when not in open waters, They were also used by submarines and anti-submarine ships to locate enemy submarines.
Sound waves travel very well in water. Warships, including submarines, use passive sonar to listen for enemy ships and submarines. Passive sonar employes underwater hydrophones to listen for sounds. They can detect sounds of ships and submarines miles away. Marine mamals such as whales and dolphins detect sound in much the same way.
The main method is through listening using passive Sonar. Active sonar sends out a sound signal that can be used to bounce off the enemy. It may also give away their own position.
Sonar was used widely in World War II in an effort to locate enemy submarines. It wasn't as sophisticated as it is today, but it did help. Actual numbers are difficult to come by, but sonar was effective in the successful attacks on several submarines.
They use sonar to find the enemy. Passively, they listen for the sounds of the other ships, which will give them a bearing to the target. Active sonar will ping the enemy and provide a range as well.
There are now 'Attack' submarines who's main purpose is to sink enemy submarines and ships and also Missile submarines whose main purpose is to launch ballistic missiles at the enemy.
By torpedoing their enemy ships: it was all they could do and were designed to do; but anti-submarine warfare was in its infancy and submarines were very hard to detect once submerged. They are even stealthier now.
To sink enemy vessels, ships or submarines.
Detection of (enemy) submarines.
Sonars were used to detect any objects that got into the detection field of the sonar. By this, the military could detect enemy submarines etc., which they couldn't see normally because of the opacity and/or darkness of the water.