You know that classic image of a red apple with a little bug coming out of a hole? It is well known in many cultures, especially in children's books and illustrations. In reality, it can be represented by a caterpillar of the apple moth, Cydia pomonella.
C. pomonella can bore into the fruit when it is a larva and make its temporary home inside the apple, feeding on the pulp. Eggs are laid on leaves or fruit. When it is mature and nourished, the larva leaves the fruit and looks for a place to weave its cocoon for metamorphosis.