Go to System Preferences, Energy Saver (or something like that), and then you should see a couple of slider controls, one of which will be how long before your computer goes to sleep. Move it all the way to the right, and it should say "Never" underneath. I would recommend making sure that the display still shuts off just to avoid any possibility of image persistence/burn in.