Histamines are chemical messengers that communicate between cells. Antihistamines competitively inhibit histamines from binding to H1 and H2 receptors. First generation antihistamines are sedating but treat allergy symptoms, while second generation antihistamines are non-sedating. Cimetidine was the first H2 antagonist developed for treating gastric acid secretion by competitively blocking histamine at H2 receptors on parietal cells. It helped establish structural requirements for selective H2 receptor antagonism through its imidazole and substituted guanidine groups.