Endocarditis is caused by a growth of bacteria on one of the heart valves, leading to an infected mass called a "vegetation". The infection may be introduced during brief periods of having bacteria in the bloodstream, such as after dental work, colonoscopy, and other similar procedures.