Why could you get inflammation of a heart valve?

Rheumatic fever. Untreated strep throat (usually in children) can lead to rheumatic fever which can cause severe inflammation and permanent damage to a heart valve (rheumatic heart disease).
Usually an infection. Bacteria in the blood stream from an infection can infect a heart valve causing severe inflammation and damage and leading to heart failure, stroke, need for heart valve surgery and/or death. Occasionally, heart valves can be inflamed from other chronic inflammatory medical conditions (such as lupus).