Echocardiography relies on ultrasound waves to generate images of the heart. These waves are directed towards the heart and then reflected from various internal structures, creating an image based on the differences in tissue density and composition.