Welcome to the Candy Crush Saga Community
Do you have a question or need help with your game? Ask the Community.
I am not too sure about the how part @foxy, but the when is whenever you want.
From the map screen of your game just select Shop and you will be able to purchase unlimited lives as part of a package.
Alternatively if you are just after lives then click on your life counter and you will see the 6 hours of life for 69 gold offer. You might have to buy gold bars from your shop to use this option.
I am sure @Crazy Cat Lad can point you in the right direction when it comes to the how.