Cardiac pulmonary edema also known as congestive heart failure occurs when the diseased or overworked left ventricle isn't able to pump out enough of the blood it receives from your lungs. As a result, pressure increases inside the left atrium and then in the pulmonary veins and capillaries, causing fluid to be pushed through the capillary walls into the air sacs.
Lungs contain numerous small, elastic air sacs called alveoli. With each breath, these air sacs take in oxygen and release carbon dioxide. Normally, the exchange of gases takes place without problems. But in certain circumstances, the alveoli fill with fluid instead of air, preventing oxygen from being absorbed into your bloodstream.
A number of things can cause fluid to accumulate in your lungs, but most have to do with your heart (cardiac pulmonary edema).
Congestive heart failure can also occur when the right ventricle is unable to overcome increased pressure in the pulmonary artery, which usually results from left heart failure, chronic lung disease, lung infections or high blood pressure in the pulmonary artery. Other Heart issues that can cause Cardiac Pulmonary Edema are Coronary artery disease, Cardiomyopathy and Heart valve problems.