Aldosterone tells the kidney to keep salt and lose potassium. Spironolactone blocks that signal, so salt and water leave while potassium stays.
An aldosterone antagonist, spironolactone acts at the cortical collecting duct. It is used for ascites in cirrhosis (where there is secondary hyperaldosteronism), heart failure, nephrotic syndrome, Conn's syndrome, and hypertension at step 4 of the NICE pathway. The main side effects are hyperkalaemia and gynaecomastia; eplerenone causes less gynaecomastia.