The urinary system consists of the kidneys, ureters, urinary bladder, and urethra, with the kidneys being the main organs that filter waste from the blood to produce urine. The kidneys contain nephrons that filter the blood and regulate water and electrolyte levels through selective reabsorption and secretion in the tubules. Urine is then transported from the kidneys through the ureters to the bladder for storage and then exits through the urethra.