The urinary system consists of the kidneys, ureters, urinary bladder, and urethra. The kidneys filter waste from the blood to produce urine. The urine passes through the ureters to the bladder, where it is stored until excretion through the urethra. The kidneys play a vital role in regulating water balance and electrolyte levels in the body by selectively reabsorbing needed substances and secreting waste through urine production. The urinary system works to maintain homeostasis in the body.