Butterflies need places to feed through all four stages of their lives.

Nathan Blaney/Photodisc/­Getty Images

­Butterflies are pretty and somewhat mysterious. That's a perfect combination to spark our imaginations. They appear in our art, our poetry and even in our tattoos. So with about 20,000 species of butterflies in the world and more than 700 species living in North America alone, why aren't they appearing in your backyard [source: North American Butterfly Association]?

First it's important to understand the life cycle of a butterfly because it has different needs during different times of life. Butterflies become adults through a four-stage metamorphosis, beginning as an egg. Larva (a caterpillar) hatches from that egg and becomes a chrysalis (pupa) that finally transforms into an adult. Food preferences vary during each phase of life -- larvae, for example, like to munch on leafy greens but most adult butterflies eat a liquid nectar diet that they drink through a long, tubular mouthpiece called a proboscis.

Adults live anywhere from a few days to about six months, with ­most lasting about 10 to 20 days -- it depends on the species and the number of predators around. Butterflies tempt a sizeable group of predators including birds, bats, snakes, toads, monkeys and, yes, even humans. Birds especially love to snack on caterpillars.

­Butterflies are only looking for a few simple things out of life: shelter from predators, sun for basking and flower nectar for sipping, which incidentally makes them great pollinators. They're also looking for the right spot to lay their eggs. Your yard may be sunny and flowers may be blooming, but just as people have specific likes and dislikes, so do butterflies. Let's find out the tricks that will have butterflies eating out of your hand (well, not literally).