If you minimize or close the app on a device that’s still running, when you return to the game, you’ll find the level exactly as you left it!
The exceptions are when your device doesn’t have enough free memory or if your device runs out of battery while you’re playing. But even in that case, the level won’t count as a loss. You’ll just have to start it over from the beginning.