This paper reviews the biology of insect parasitoids and cleptoparasitoids and places them in an evolutionary context. Available biological data are reviewed and tabulated (at the family level) with an emphasis on non-hymenopteran parasitoids. Existing cladistic or near-cladistic treatments of the parasitoid groups are used to make outgroup comparisons, and pathways to and from the parasitoid lifeway are estimated. Approximately 10% of all described insect species are parasitoids or cleptoparasitoids. Of these about three-quarters are Hymenoptera, and one-quarter are either Diptera or Coleoptera. The parasitoid lifeway has arisen most commonly in the Diptera, where it has evolved independently in 21 families (probably over 100 times). It has arisen in 11 coleopteran families but probably only once in the Hymenoptera. In most cases host searching is by the adult female parasitoid but in a significant minority of cases host-searching is by the first instar larva of the parasitoid, or (more rarely) by the host ingesting the parasitoid's egg. Dipteran parasitoids (as a whole) have a wider host range than hymenopteran or coleopteran parasitoids. The most common pathways to parasitoidism are from mycophagy, saprophagy and predation. In contrast, evolutionary shifts away from parasitoidism are relatively rare. Possible evolutionary explanations for these pathways are reviewed and others are suggested. A possible (evolutionary) explanation of the common evolutionary association of parasitoids with specialized egg predators is also discussed.