Moths reproduce when males follow pheromone trails to a receptive female and mate, after which the female lays eggs that hatch into caterpillars, the first stage in the ambulatory portion of the moth's life cycle. Most caterpillars are eaten or die before reaching adulthood, but those that do survive metamorphose into adult moths and fly off in search of mates themselves.
Many moths cannot eat in their adult forms and are driven solely by the urge to mate. If they cannot find a receptive moth of the correct sex before their body runs out of resources, they will starve to death without mating or passing on their genetic information.
Male moths of some species can detect the pheromone trail of a receptive female within a radius of miles. This allows male moths to track females down so that they can fertilize their eggs before starvation takes its toll and they are unable to fly or pursue a mate any longer.
Caterpillars eat continuously throughout their existence in order to build up reserves. These reserves are used first for the energy-intensive process of undergoing metamorphosis into an adult moth and then, once that is complete, for powering the moth's journey by wing in search of a mate.