If you lose a level then you’ll lose a Life. If you run out of Lives then you can’t start a level. However, Lives refill overtime and you can use Coins to refill your Lives faster.
Sometimes you will be rewarded with Unlimited Lives. Whilst Unlimited Lives is active, you will not lose a Life even if you fail a level.