In left heart failure, the left ventricle can not keep pace with the incoming blood from the pulmonary veins. The resulting backup causes increased pressure on the alveolar capillaries, and red blood cells leak out. Alveolar macrophages (dust cells) engulf the red blood cells, and become engorged with brownish hemosiderin.
In chronic pulmonary edema, alveolar septa become thick and fibrous, again increasing pressure on alveolar capillaries and resulting in leakage of red blood cells which undergo phagocytosis by alveolar macrophages.