Imagine you are going about your usual business of foraging and are haplessly exposed to a spore that invades your head and produces a fungus that hacks your brain, makes you climb up into a tree, hang upside-down from a branch, and die. All to the purpose of the fungus propagating itself by growing a stalk out of your skull to release more of its spores.
Well breathe easy, it can't happen to you, unless you are a certain species of ant. I wouldn't blame you for calling bullshit at this point (I did), but it's a real thing.
'Zombie ant fungus' is what the popular press has called Ophiocordyceps unilateralis, which is a fungus that indeed infects many insects. The 'zombie' part, though is pure sensationalism, which may be forgivable, because who, really, would read an article about 'ant fungus'? Yet the truth is a bit stranger than the fiction.
When this fungus infects two species of carpenter ants (Camponotus castaneus and Camponotus americanus), it releases chemicals that affect the central nervous system and produce the behavior described above. The chemicals produced are specific for the particular ant species. After growing throughout the ant's body, the fungus eventually kills the ant (once the ant has done the necessary job of climbing up some vegetation and hanging upside-down) and a stalk grows out of the ant's neck. A fruiting body (something like your usual mushroom) grows at the end of the stalk and releases spores to complete the fungus life cycle.
How this particular fungus came to tie its life cycle in such a detailed and bizarre way to particular ant species is an interesting scientific question that may be explained by co-evolution mechanisms.
Oh, and if you dare, you can buy a cordyceps 'supplement' that offers a bunch of very unlikely health superpowers.
Popular science article
Cordyceps food supplement