Several types of swallowtail butterflies visit us, including tiger (Papilio glaucus), giant (Haclides cresphontes), and black (Papilio polyxenes asterius). The only one that spends its whole life cycle where I can see it is the black swallowtail. The larvae feast on fennel, which grows for two or three years before it dies, meanwhile producing plenty of seedlings.
The fennel usually gets a good headstart because it grows well in the cold months, coming back quickly from freezes, so there is plenty for the first caterpillars to eat. They start out tiny, bumpy, and dark colored with a white saddle marking. They are pretty hard to see, even in the midst of the feathery green foliage. As they get bigger, they take on a striped and spotted pattern. Since the caterpillars are rather soft and lack spines, they have a different means of defense. When threatened, they stick a two-pronged, orange extension out from their head. This probably has some noxious chemical on it, but I've never noticed any bad smell. It is, however, very wet looking and sort of sticky.