If you have a sufficient number of plants regularly producing coins, Stinky will remain awake and continue to gather them. You can either occasionally return to the game in order to manually collect the coins which have been produced or, to be sure that you are missing no coins, buy Stinky the Snail from Crazy Dave's Shop and let him pick up the coins on your behalf.
Instead, coins will continue to appear in the garden at the usual rate. The game needs to be running, with the Zen Garden selected and showing on-screen, but you can then let it run in the background while doing anything else you like (gaming, browsing, whatever) and the game will not pause itself. You needn't actually be actively playing the game in order for the Zen Garden to continue producing coins.