Infective endocarditis is an infection of the inner lining of the heart caused by bacteria or fungi. It can affect the heart valves and cause them to malfunction. Risk factors include intravenous drug use, poor dental health, and congenital heart defects. Symptoms may include fever, fatigue, loss of appetite, and heart murmurs. Treatment involves antibiotics given intravenously for several weeks. In severe cases, heart valve replacement surgery may be needed to repair or replace damaged valves.