The kidneys are located deep on either side of the middle part of the back, tucked up half way under the rib cage. They filter the blood all the time, going through about 180 L per day.
The kidneys remove waste from the blood and concentrate it as urine. The working parts of the kidneys are called nephrons. From the nephrons, the urine travels through the tubules down to the bladder bit by bit as it is made by the kidneys. The tubules take out as much water as possible as the urine goes by and return it to the blood. When the bladder gets full enough, the person will feel the need to urinate.
The kidneys are essential to keeping the right level of water, salts, and acidity in the body. Critical illness often throws off this balance, making it difficult or impossible for the kidneys to do their job. They help maintain blood pressure, manage stress, and start red blood cell production by releasing hormones as needed. The kidneys also assist in processing and excreting medications.