Butterflies & moths, they both have 4 wings. The beautiful creatures fly very differently than birds or other insects. A butterfly's flight motion is quite unstable. Well, 'unstable' isn't the right word as it beats in a synchronised pattern. And they can't fly that fast. Unlike birds or insects.
But, this 'unstable' flight is actually a self defence mechanism. As they fly slow(er), those unstable beats help them prevent getting eaten by birds! Isn't that amazing? There are some butterflies that look way prettier than others, so bright in color. Where you see predatory animals tend to blend in. Well, those butterflies are poisonous! Another self defence mechanism.
Some non-poisonous butterflies tries to mimic their design as yet another self defence mechanism! The poisonous butterflies also beat their wing slowly (fly slowly). So, the non-poisonous ones do not only mimic the color of the wings but also the speed of the flight, making it harder for the birds to differentiate. There are some butterflies whose wings have different colours all together from the inside and the outside. So when it is resting, it has one colour and when it is attacked, it can just open it's wings and perhaps has a brighter colour to scare of the predator!
Some wings develop a pattern like big eyes. Why eyes? Well, on a different story, in the ~Sundarbans~, tigers attacked villagers. And the villagers started wearing masks on the back of their head, the masks had eyes, it mimics the idea of looking behind. Tigers, when they saw this they thought the prey is looking at them and the attack on the villagers reduced by a big number.
Maybe, the butterflies are also using something similar against smaller predators.
Now, lets talk about moths, they also have more or less these characteristics. You often see moths or butterflies have broken bottom wings. Well, they can just fly pretty well without them. It's another self defence mechanism... with a little sacrifice. When birds attack them, if the birds / predator get a hold of the bottom tips, it can be torn off but the butterfly or moth can safe its life.
Lastly, though all these are colourful and lively, these work mostly on the day time, at night time, in the dark, the colours of the wings can't be seen. And moths get eaten by bats. Bats use sound instead of the visual approach.
Well, in defence of the moths, they have long tails, that can confuse the bats. Some moths have scales that absorb sound, turning them invisible. Some of them can create some sort of clicking sound, making more sound to confuse the bat.