Sonar sends sound waves out, listens for echoes, and uses the time to calculate distances. Submarines use this to navigate and detect objects underwater where radar doesn't work.
Bats use the same principle - echolocation - to fly in the dark without crashing.