Olopatadine is an antihistamine that works by inhibiting the action of histamine, a substance in the body that causes allergic symptoms.