Drag the two sliders highlighted in the picture to the extreme right. This ensures that the computer and the display never go to sleep. Uncheck the "put hard disk(s) to sleep when possible" check-box. You are now ready to stay absolutely awake.
Does this sound like too much work?
You can always get Caffeine to do the job for you. Caffeine is a tiny program which sits in your menu bar. Click it to disable automatic sleep and click it again to get your system energy saving settings back. Caffeine gives you the ability to set up how long you want your Mac to be awake.
Caffeine also gives you a visual representation of when it is working. Normal sleep is an empty white coffee-cup and awake is the same coffee cup with coffee in it.
Usage Note: To quit, click on the menubar icon while holding down the Command key. You are going to get a drop-down menu and you can quit the program from there.