Codling moth (Cydia pomonella) causes maggot damage in apples and pears (and sometimes walnuts and quinces). The adult moth lays its eggs on the surface of the fruit. After hatching, the larvae (or maggots) burrow into the fruit to feed, ruining it. They later burrow out to pupate back into moths.