This is what wikipedia says:
A moth is an insect closely related to the butterfly. Both are of the order Lepidoptera. The division of Lepidopterans into moths and butterflies is a popular taxonomy, not a scientific one. Sometimes the names "Rhopalocera" (butterflies) and "Heterocera" (moths) are used to formalize the popular distinction. Many attempts have been made to subdivide the Lepidoptera into groups such as the Microlepidoptera and Macrolepidoptera, Frenatae and Jugatae, or Monotrysia and Ditrysia. Failure of these names to persist in modern classifications is due to the fact none of them represents a pair of "monophyletic groups". The reality is that butterflies are a small group that arose from within the "moths," and there is thus no way to group all of the remaining taxa in a monophyletic group, as it will always exclude that one descendant lineage.
People who study butterflies and/or moths are called lepidopterists; the study of butterflies is known as butterflying, and the study of moths mothing, the latter giving rise to the term "mother" for someone who takes part in this activity—sometimes written with a hyphen inserted (moth-er) to distinguish it from the word for a female parent. This confusion does not arise in spoken English since the two terms are pronounced differently.