When the system is inactive, the screen gets locked and gets turned off in Ubuntu 12.04 LTS after 10 minutes by default.
To change this :
1. Select the gear icon (System settings) from the sidebar.
2. Under “Personal” section, click on “Brightness and lock” icon.
3. Change the time period for “Turn screen off when inactive for” to any suitable interval as desired. Also if needed, change the time period for “Lock screen after” to what is required or disable it by moving the slider. Brightness can also be adjusted as per preferences.
4. Close the window for the settings to take effect.