This article is from the Dolphin
FAQ, by Jaap van der Toorn
Dolphins (and other toothed whales) can produce high pitched clicks. When these clicks hit an object, some of the sound will echo back to the "sender". By listening to the echo and interpreting the time it took before the echo came back, the dolphin estimate the distance of the object. (That's why sonar is also called echolocation: with information from the echoes, a dolphin can locate an object). Depending on the material the object is made of, part of the sound may penetrate into the object and reflect off internal structure. If the object is a fish, some sound will reflect off the skin on the dolphin's side, some of the bones, the internal organs and the skin on the other side. So one click can result in a number of (weaker) echoes. This will give the dolphin some information about the structure and size of the fish. By moving its head (thereby aiming the clicks at other parts of the fish) the dolphin can get more information on other parts of the fish.
It is like a medical ultrasound probe, but the results are far less clear. A medical probe moves back and forth very rapidly, much faster than a dolphin can move its head. Also the frequency of the sounds of the medical probe is much higher than a dolphin's sonar. Therefore the level of detail the echoes can provide is much higher in the medical probe.
For technical information on dolphin sonar, check out the following book:
W.W.L.Au (1993) The sonar of dolphins. Springer-Verlag New York