Hepatic encephalopathy is a condition characterized by confusion, changes in mental status, and coma caused by liver failure and resulting in the buildup of toxic substances normally removed by the liver. It is graded based on severity from mild confusion to coma. Common precipitants include renal failure, electrolyte imbalances, infections, and certain drugs. Diagnosis involves assessing liver function, ruling out other causes, and potentially measuring ammonia levels.