What used to be a caterpillar has now molted and become a pupa. The pupa looks much more like an adult than a larva: you can see the developing wings, the pointed abdomen, the head and eyes, and even the tongue. The pupa is covered by a sclerotized (hardened) cuticle; it cannot feed, and has no mobile appendages, though the abdominal portion can rotate somewhat.
During pupation the insect's body undergoes a major reorganization. The nervous system grows drastically and restructures itself, new sensory structures are added (e.g. antennae), muscles are removed and rebuilt, adult locomotive features are constructed (e.g. wings), the digestive system is reorganized to adapt to a new diet, and the tracheal system is modified to provide for all these new tissues. All of this is done without feeding; the required energy comes solely from stores laid down during the larval stage.
The stem-like structure that comes out of the pupa's head is actually its developing tongue. The tongue grows out from the head, forms a loop at the base of the stem-like structure, and grows back towards the head. This long tongue enables the adult moths to feed on the nectar of deep flowers, such as Datura / angel's trumpet. The tongue will normally be coiled up inside the moth's head once it is an adult.
I showed off the pupae during our recent campus open house, and the first question I was usually asked was, "How long before they turn into adults?" Unfortunately, there is no easy answer to that question.
As you've probably gathered based on M. sexta's three-week larval period, M. sexta can easily go through three or four full generations in a year. However, once winter arrives, M. sexta's host plants start to die out, and the cold weather hinders M. sexta's performance (they are ectotherms, after all). Thus, M. sexta would much rather wait out the winter and pretend it didn't exist.
To avoid the winter, M. sexta pupae can enter diapause, a state of delayed development. In their fifth instar the caterpillars measure the day length, and if the days are shorter than a given length, the caterpillars figure that winter is coming on and enter diapause immediately after pupating. During diapause the pupa may slowly develop, but the insect will not eclose until conditions have become more favorable (often measured by temperature). However, if the days are longer than the cutoff (I seem to remember 14 hours, but can't find a source to verify this), they will pupate normally and eclose into adult moths in only a few weeks.
Since I know neither the specific day-length cutoff of M. sexta, nor the number of hours of light these caterpillars were receiving, I'm not sure whether these pupae are going to diapause or not. So, I may get adult moths eclosing in a few weeks, or a few months; we'll just have to see.
It's interesting to note that not all insects have a pupal stage. Moths and butterflies (along with flies, beetles, and some other groups) are holometabolous insects, wherein the adult form is typically quite different from the larval form, and the two are separated by a pupal stage. Some insects' juvenile stages are very similar to their adult stages (e.g. grasshoppers and praying mantises), and these insects are said to exhibit hemimetabolous development; they do not form a pupa.