A wasp is any insect of the order Hymenoptera and suborder Apocrita that is not a bee or ant. The suborder Symphyta includes the sawflies and wood wasps, which differ from members of Apocrita by having a broader connection between the mesosoma and metasoma. In addition to this, Symphyta larvae are mostly herbivorous and "caterpillarlike", whereas those of Apocrita are largely predatory or "parasitic" (technically known as parasitoid).
The most familiar wasps belong to Aculeata, a division of Apocrita, whose ovipositors are adapted into a venomous stinger. Aculeata also contains ants and bees. In this respect, insects called "velvet ants" (the family Mutillidae) are technically wasps.
A narrower but popular definition of the term wasp is any member of the Aculeate family Vespidae, which includes (among others) the genera known in North America as yellowjackets (Vespula and Dolichovespula) and hornets (Vespa).