Galls are highly variable plant structures which can be formed by a number of causes. They usually appear as an abnormal swelling in a leaf or stem. Insect galls are caused when an insect uses chemicals to seize control of a section of plant tissue, stimulating it to form a favorable habitat for a juvenile insect. The gall provides both shelter from predators, as well as food and moisture.
A number of insects have independently developed gall-forming abilities. These include gall wasps, gall flies, gall midges (a small fly), aphids, and more. In many cases the adult insect injects an egg into the plant, where it then develops into a larvae and pupae, and finally emerges as an adult. Galls are not entirely safe from predation–many insects have developed strategies for getting at the developing young. For example, a number of parasitoid wasps inject their own eggs into the developing gall inhabitant, which is consumed as food by the new parasitoid.