Endocarditis is an inflammation of the inner lining of the heart chambers and valves, known as the endocardium. This condition is usually caused by an infection, often bacterial, although fungi or other microorganisms can also be responsible. The infection can lead to the formation of clumps of microorganisms and cells, known as vegetations, on the heart valves.