The fungus is Phallus rubicundus, or stinkhorn fungus. Normally the red tip is brown/olive-brown and covered in ooze. This brown ooze is actually the spore mass, and it stinks like rotting meat. This is no accident. That smell attracts blow flies, often in huge numbers (the tip can be
stripped back to the naked red feature you see in a matter of hours). The flies dance around on the ooze, picking up spores on their feet in the process. They then fly away and disperse the spores elsewhere. These fungi commonly emerge after a decent shower of rain, in fairly fresh litter/humus/compost. The fungus itself is a wood-rotting fungus.
Thanks to Nigel Fechner