Can you explain the pathophysiology of pneumonia and rheumatic heart disease?

Two diff diseases. These are two different diseases. Pneumonia is an infection in the lung that causes fluid to collect within the air spaces (maybe w/in a lobe or more diffuse). Rheumatic heart disease is caused by the body attacking the valves of the heart in response to an untreated/inadequately treated streptococcal (most often group a) infection ("strep throat" or other).
See details. Pneumonia is generally an infectious disease and rhd is an autoimmune process.