There is not a single defining characteristic that defines a moth versus a butterfly. Rather there are a number of characteristics. There are some day flying moths and butterflies that fly at dusk. These moths simply do not eat as adults as they have done all their eating as larvae. Butterflies rest with their wings closed and moths land with them open.
Butterflies form a pupae hanging.
Moths form a cocoon, usually on the ground. The antennae of a butterfly are straight and club-like. The antennae of a moth vary greatly but are usually brush like with a great deal more surface area.