Nephrostomy relieves the buildup of urine in the kidney and prevents the kidney from being damaged.