Spironolactone is a potassium-sparing diuretic mostly prescribed for hypertension.
Its side effect is that of an anti-androgen.
"Diuretic" means that it induces excretion of water in your system causing lots of peeing.
The "potassium-sparing" indicates a class of diuretic which just happen to not cause lots of potassium to be lost in the urine.
The big worry is eating things with lots of potassium and accumulating too much potassium in your system.
"Hyperkalemia" is the name for excessive potassium. Heart problems can be one result.