Both the systems are used for detection of objects but at different places. Sonar does detection under water where as Radar does it above the land or sea. The principle of operations of both sonar and radar are same but uses different wave types.
SONAR based on their principle :
When ultrasonics waves is transmitted through water, it is reacted by the object in the water and will produce an echo signal i.e it based on the echo ( reaction of sound wave).
Sonar uses the echo principle by sending out sound waves underwater or through the human body to locate objects.
RADAR based on their principle of operation.
• Primary radar, Secondary radar
• CW radar, Pulse radar • Monostatic Radar, Bistatic Radar
• Radar types based on applications of use e.g. weather radar, search radar, automotive radar, ground penetrating radar.
Radar is a detection system that uses radio waves to determine the range, angle, or velocity of objects. It can be used to detect aircraft, ships, spacecraft, guided missiles, motor vehicles, weather formations, and terrain.