Hepatic encephalopathy is a syndrome of altered mental status and neurological dysfunction seen in patients with liver disease. It progresses from confusion to coma and can potentially lead to permanent neurological damage. It is caused by the impaired ability of the diseased liver to metabolize toxic substances like ammonia, which then crosses the blood-brain barrier and is absorbed by astrocytes in the brain, causing them to swell. Treatment focuses on reducing ammonia levels through medications like lactulose and rifaximin that alter bowel bacteria to prevent ammonia reabsorption.