Heart failure cells form when there is increased pressure in the pulmonary capillaries, often due to left-sided heart failure. This elevated pressure causes red blood cells to leak into the alveolar spaces where they are phagocytosed by alveolar macrophages. The hemoglobin from these red blood cells is then degraded into hemosiderin, giving these macrophages their distinctive appearance.