One of the main metabolic waste products that the kidneys remove is urea. When excess amino acids are present, or during a period of starvation when other energy sources are depleted, the body will break down amino acids from proteins and burn them for energy in the Krebs cycle. During this process, the nitrogen is enzymatically removed from the amino acid and released as ammonia, which is highly toxic. The liver converts the ammonia to urea, which is much less toxic than ammonia. The kidneys then remove the urea from the bloodstream.
This animation (Audio - Important) describes the structure of the urinary system.