You receive three lives, and when a level is lost, so is a life. One life refills every twenty minutes, but you can also ask your friends for lives (if your game is connected to a Facebook account) or purchase lives by clicking on the Life Meter.
Sometimes the reward for completing a quest is a set period of Infinite Lives. During this period (which begins as soon as the reward is won) players won't lose any of their lives.