We've all been there at some point. It's summer, it's a beautiful day, and you find yourself strolling along a trail. You are walking along, enjoying the sights, sounds, and smells of your environment when you harmlessly brush by a patch of waist-high plants. You don't think anything of it. They are herbaceous and don't readily catch the eye. A few steps later and the burning starts. It is mild at first but wherever your skin met the tissues of those plants an itchy, burning sensation starts to amplify. You have likely just encountered a species of stinging nettle.
Nettles hail from a handful of genera. There are many different species of nettle but you are most likely to encounter either stinging nettle (Urtica dioica) or the wood nettle (Laportea canadensis), all of which belong to the nettle family (Urticaceae). A closer inspection of the plant reveals that the stems as well as the underside of the leaves are covered in tiny hairs. These hairs are called trichomes. A subset of these trichomes are what caused your discomfort.
These trichomes have been honed by natural selection into a very effective defense. They are an elongated cell that sits atop of a multicellular pedestal. They are quite brittle and any contact with them causes their tips to break. They are also hollow and once they are broken, they essentially function like mini hypodermic needles. They penetrate the skin of any animal unlucky enough to brush up against them and inject an irritating fluid into the tissues of their "attacker." The fluid itself is quite interesting. Chemical analyses have revealed that it consists of a complex mixture of histamines, acetylcholine, serotonin, and even formic acid. Chemists are still working out the exact makeup of this chemical weapon and how much variation there is between different stinging species.
As you might have deduced by this point, these stinging hairs are a defense mechanism. They protect the plant from herbivores. However, not all herbivores are deterred by this defense. It was found that invertebrates don't seem to have any issue navigating the stinging hairs. Instead, it is thought that the stinging nature of these plants evolved in response to large mammalian herbivores. This makes some sense as larger herbivores pose more of a threat to the entire plant than do invertebrates.
Even more interesting is the response of some nettles to varying levels of herbivory. It has been found that heavily damaged plants will regrow leaves and stems with higher densities of stinging hairs than those of plants that have experienced lower rates of herbivory. This too makes a lot of sense. Stinging hairs require resources to produce so plants that have not experienced high rates of herbivory do not bother allocating precious resources to their production.
Even more interesting is the fact that for stinging nettle (U. dioica), male and female plants tend to have differing densities of stinging hairs. Female plants produce more stinging hairs than males. It is thought that since females must invest more resources into producing seeds than males do into producing pollen, they must also invest in more protection for these valuable reproductive assets.
These nettles are not alone in producing such stinging trichomes. Many other plant species have converged on this defensive strategy. If you have ever experienced this for yourself, you can really understand just how effective it can be.