The kidney is an excretory organ. It functions to maintain the water, the acid-base concentration, and filter the blood; the waste products are excreted as urine. The organ is described by the Malcorians and Gosis' species as the renal organ.
In 1986, Dr. Leonard McCoy gave a kidney pill to an elderly woman in San Francisco who was suffering from "kidney dialysis." The pill apparently caused the spontaneous growth of a new kidney. (Star Trek IV: The Voyage Home)
After living with Spock's katra in his head, Leonard McCoy stated that he would have "felt safer giving him one of his kidneys than having what was scrambled in his brain." (Star Trek III: The Search for Spock)
In 2377, Chakotay was knocked unconscious by a chronokinetic surge and taken to sickbay. Upon examination, The Doctor found his body was in a state of temporal flux, as he had the liver of an eighty-year old and the kidneys of a twelve-year old boy. Fortunately, The Doctor injected Chakotay with a chroniton-infused serum which brought his body back into temporal alignment. (VOY: "Shattered")