In response to an allergen, such as pollen in hay fever, specific immune cells like mast cells and basophils realise large amounts of certain inflammatory particles, such as histamines.
Over accumulation of histamines results in local inflammation and symptoms such as redness and itchiness. Taking an anti-histamine blocks the effect of histamines, thus reducing symptoms of allergic responses.