In general patients are given medicine to increase fluid excretion from the body ( diuretics), plus treatment of the underlying cause.
In the common situation when heart failure
is the cause, then rx to improve heart function ( opening blocked coronary arteries, medicines to optimize heart action) would be used. Supportive treatment from extra oxygen
to ventilator support may also play a role.