The majority of Ichneumon Wasps resemble slender wasps but differ from the stinging wasps in having longer antennae with more segments (usually at least 16). Many have long ovipositors, often longer than the body. There are around 5,000 species of Ichneumon Wasps described in North America. Some estimate there are another 3,000 North American species as yet undescribed. The worldwide species number estimate is 60,000. Ichneumonids are notoriously hard to identify.
What BugGuide says about Subfamily Campopleginae: They are koinobiont endoparasitoids; hosts are mostly Lepidoptera, Symphyta and a few attack Coleoptera.
What that means:
Parasites live within or on a host without killing the host. Parasitoids ultimately kill their hosts. Koinobiont parasitoids allow the host to continue its development and often do not kill or consume the host until the host is about to either pupate or become an adult. Endoparasitoids develop inside the body of their host.
So ... A female campoplegine oviposits an egg inside the body of a host larva (a caterpillar, usually). The host larva continues developing into a pupa. The Ichneumon Wasp egg hatches into a larva which 1.) consumes the host and 2.) benefits from the protection provided by the host's pupal case. Before the host pupa becomes an adult, the wasp larva finishes it off, emerges and form its own cocoon. If all goes well, the Ichneumon larva will emerge from its cocoon as an adult wasp. Campoplegine cocoons look something like a small speck of bird poop. (Photo here.) Hosts for this subfamily include butterflies and moths, sawflies and a few beetles.