Below is brief photographic tour of stinkhorn development, in this case Phallus ravenelii.
The initial "egg" stage.
An egg cut open, reveling the different parts of the stinkhorn already formed - ready to emerge. The innermost off-white layer is the stalk. The white layer and the green layer form the head of the stinkhorn.
Stinkhorns emerging from their "egg", splitting through the outer tissue layer (peridium). Growth of the stinkhorn occurs as the underground mycellium pulls in water from the soil, the pressure of which allows the stinkhorn to expand. This process occurs in most mushroom-forming fungi, but its a bit more dramatic, and maybe suggestive in a stinkhorn.
A matured stinkhorn. The brown cup at the bottom is a remnant of the outer tissue layer. It is known as a volva. A similar structure is seen in a few other mushroom groups, most notably in the Amanitas. A piece of it is often stuck to the top of the cap.
Fulfilling its purpose in life; a stinkhorn with wholes chewed into it. The insects, slugs, etc that feed on the stinkhorn will either get the spores stuck on their body, or ingest them. In either case the spores will be dispersed to a new location - which is what spores do after all.