Famotidine is a histamine-2 blocker that works by decreasing the amount of acid the stomach produces. Famotidine is used to treat and prevent ulcers in the stomach and intestines. It also treats conditions in which the stomach produces too much acid, such as Zollinger-Ellison syndrome.