Endocarditis is an inflammation of the inner lining of the heart chambers and valves, known as the endocardium. This condition is typically caused by an infection, most commonly bacterial, but can also be fungal or due to other pathogens. The infection can lead to the formation of vegetations, which are clumps of platelets, fibrin, microorganisms, and inflammatory cells.