Endocarditis is an infection of the inner lining of the heart chambers and valves, typically caused by bacteria or other microorganisms entering the bloodstream. It is a serious condition that can damage heart valves and lead to complications if left untreated.