Just search for and open Terminal from Spotlight Search, from your Launchpad, or via the Utilities folder in Applications. Like other operations, Caffeinate is run via Terminal. Some of the more common options are adding a sleep timer, targeting a specific program/process, and modifying the sleep options. The command can be run by itself along with some modification options that will customize its behavior. As the name suggests, running the command will 'caffeinate' your Mac and prevent it from going to sleep. The aptly named Caffeinate is a command line utility that is accessed via Terminal. More recent versions of OS X introduced some changes to the way the system handles going to sleep alongside a handy built-in utility to induce insomnia.
A classic option is to use the free program Caffeine. Naturally, there are various solutions available for this dilemma. To resolve this, you can go to System Preferences and mess with the settings, but this can be an annoying process if you need to do it often. Yet in certain scenarios, you might not want your Mac to go to sleep: downloading a huge file, reading a book, reviewing a spreadsheet, analyzing some content on the screen.
Macs are generally highly power efficient due to, in part, the optimized sleeping schedule with OS X.