The stinging nettle is Urtica dioica, and the standard explanation of how it stings is wrong.
The hairs are trichomes: fine silica-tipped tubes that break at a bevelled edge on contact, leaving a microscopic hypodermic needle which penetrates skin and delivers the contents of the cell beneath. The mechanism is genuinely a syringe, and this part of the popular account is correct.
The contents are not simply formic acid. The sting is a mixture, and the components identified include histamine, which produces the immediate weal, acetylcholine and serotonin, which contribute to the pain, and various other compounds including leukotrienes; formic acid is present in small quantity and is not the principal agent. The persistent belief that nettles sting with formic acid, and the derived belief that dock leaves work by being alkaline, are both folk chemistry. Dock does often grow beside nettles, being a plant of the same disturbed nitrogen-rich ground, and rubbing anything cool and wet on a sting provides some relief; there is no evidence of a specific chemical antidote.
The sting is destroyed by heat, drying and crushing, which is why cooked nettles, nettle soup and dried nettle tea are safe and were a real seasonal food. Young spring tops are genuinely nutritious, high in iron and protein for a leaf vegetable, and were an important early-season green in northern Europe before imported produce.
Nettle also yields a strong bast fibre, spun and woven into cloth across Europe well into the modern period; German nettle textiles were produced at scale during the First World War when cotton was unavailable.