Sonar and Radar work in the same way. A signal is transmitted, and the reflected signal is used to work out the speed and distance of the object from which the signal is reflected.
Sonar
Sonar uses sound waves. It is most often used in water, to find fish for example.
If the velocity of sound waves in water isand the time between sending and receiving a signal isthen between being sent and received the waves have travelled a distance
Radar
Exactly the same equation can be applied to find the distance of a plane using radar, except of course thatthe speed of light.