Congestive heart failure is caused by loss of pumping power by the heart, resulting in fluids collecting in the body. This can result in situations such as pulmonary edema and peripheral edema. Congestive heart failure often develops gradually over several years, although it also can happen suddenly. It can be treated by drugs and in some cases, by surgery.