Do you mean the screen timeout? Or is the phone actually powering off completely on its own?
If you're talking about the screen timeout, there's really no way to keep it on constantly. You can go to Settings>Display>Sleep and adjust it anywhere from 15 seconds to 30 minutes (at least, those are the intervals on my phone).