This is a test that your doctor may request to "see" what your heart muscle is working and how your heart valves are opening. Although this might sound like a major procedure, it is in fact a simple test which uses sound waves to take a moving picture of your heart.
The test involves you lying on your back or side. A technician or your doctor will put a special jelly on to a probe which is the instrument which delivers and records the sound waves used to picture your heart.
The probe is then placed on your chest and moved around until a good quality image of your heart is recorded. Sometimes the images are difficult to get and the probe needs to be moved around so there may be some discomfort to the chest wall. Be sure to tell the operator if it is uncomfortable. Many different views of your heart will be taken to give a better idea of what the heart looks like. Your hearts motion can be seen on a video screen. The technician will record the images of your heart. 
The whole procedure may last up to 25 minutes = and has no side effects. You may be able to see the pictures as they are being recorded.
With this test, your doctor will be able to see the shape and size of your heart, to see how well it functions, to see if the valves in your heart are normal or not and to determine if there is any clot in your heart, infection on your valves or fluid surrounding your heart.