A general term for inflammation of any part of the heart linings. There are three types. Endocarditis, (inflammation of the internal lining of the heart) is usually due to a bacterial infection. Myocarditis (inflammation of the heart muscle) is often caused by a viral infection. Pericarditis (inflammation of the outer covering of the heart) is generally the result of a bacterial or viral infection but can be associated with a myocardial infection (heart attack) or an autoimmune disorder, such a systemic lupus erythematosus.