Prilosec is a brand name for the generic drug omeprazole. It works by blocking the pumps in your stomach that produce acid. Zantac is a brand name for a different generic drug, ranitidine. Zantac blocks a chemical in your body called histamine that activates the acid pumps.