Sound is produced over a wide range of frequencies. The human ear only detects sound within a certain frequency range. Dog's ears can detect higher frequency sounds, hence the dog whistle humans cannot hear. In order to detect fine structures within the body, very high frequency sound waves must be used. The frequencies in today's ultrasound machine range from 2 Megahertz to 15 Megahertz.
Megahertz denotes a million waves per second.
The sound is concentrated into a thin beam and directed into the patient by a hand held transducer. That same transducer also acts as a receiver. The sound waves enter the body and bounce off internal structures. The returning echoes are recorded and processed by a computer and converted into an image. The Doppler principle is used to detect moving objects.