Because of different acoustic impedances for different body organs / structures, the reflected waves depend on the acoustic impedance of the structure that the waves are propagating to. Using this information, an ultrasound transducer producing waves objected onto a body will reflect and refract back the waves on different intensity and time. This information could be calculated by a computer to produce different brightness dots, for B-scan types, or wave charts for A-scan types.
Now, im just curious, what does the refraction part has to do with it? (Im thinking something to do with direction)