The urea cycle is a series of biochemical reactions that converts highly toxic ammonia into urea for excretion, primarily in the liver and kidneys. The cycle involves five enzymatic steps to combine ammonia with carbon dioxide to form urea, requiring energy in the form of ATP. Defects in the cycle can cause hyperammonemia, leading to coma or death if not properly treated.