To get started, go to the Settings > Display. In this menu, you'll find a Screen timeout or Sleep setting. Tapping this will allow you to change the time it takes your phone to go to sleep. Select the timeout option that you'd like, and you're done.
I already knew that, what I'm asking is how to make the game keep the screen alive while it is running.