Urticaria is primarily caused by the release of histamine and other inflammatory mediators from mast cells in the skin. When the body encounters an allergen or irritant, it triggers an immune response, leading to the dilation of blood vessels and the formation of the characteristic wheals. This process is often mediated by IgE antibodies, especially in allergic reactions.