How do whales, bats, and dolphins use echolocation?

To scare away predators
To orient themselves and to find food
To attract mates
To tell other animals of their species where they are