Fluid around the heart is medically referred to as peiricardial effusion. It can be infection and inflammatory disorders and these conditions should be ruled out, such as lupus, cancer that has spread (metastasized) to the pericardium, kidney failure with excessive blood levels of urea nitrogen and heart surgery ( I assume there has been no surgery).
For some insight, If the fluid accumulates slowly, the pericardium (outer sac surrounding the heart) may initially stretch enough to accommodate it. Signs and symptoms may not occur until a large amount of fluid collects over time. Rapid fluid accumulation — even if the fluid amount is relatively small — can severely impair the function of the heart. Cardiac tamponade (rupture) occurs when the pericardial effusion compresses the heart and prevents effective pumping of blood to the body. This can be life-threatening.
Treatment depends on the underlying cause and the severity of the heart impairment. Pericardial effusion due to a viral infection usually goes away within a few weeks without treatment. Some pericardial effusions remain small and never need treatment. If the pericardial effusion is due to a condition such as lupus, treatment with anti-inflammatory medications may help.
If the effusion is compromising heart function and causing cardiac tamponade, it will need to be drained, most commonly by a needle inserted through the chest wall and into the pericardial space. A drainage tube is often left in place for several days. In some cases, surgical drainage may be required.