Lepidoptera (their Sunday name) usually lack jaws, making them unable to eat solid food (one group does have them, and eats pollen), but many have long, "Tongues," hollow tubes used to suck up liquids - these are coiled beneath the head until used, and when unfurled can be as long as the body. Most feed on nectar, fertilising flowers in the process (while not as prolific as bees, butterflies and moths are excellent pollinators - several species are actually dependent on one plant species for pollination, so without the moth, the plant would go extinct and vice versa).
There are a few adult moths which don't feed at all, but not many.
The larvae (caterpillars to you and me) are a different story. While most are herbivores (and the curse of gardeners, and anyone with an expensive wardrobe) the Common Blue caterpillar actually eats ant eggs and larvae (how it gets away with this is fascinating) and there's a caterpillar in Hawaii that sits still, imitating a twig, until an unfortunate fly gets too close, and becomes lunch.