Radio waves work on the same principle. The radar emits them, they hit an object, and then they bounce back to the sensor.
The sensor can then compare the sent wave with the received wave to reach conclusions about the environment.