When the heart is working properly, it is a masterpiece of timed precision, with heart valves opening and closing on cue to prevent backward blood flow. Heart valves, chambers, electrical impulses, coronary arteries and veins all of these must be in perfect working order for the heart to function at its best.