Google Apps Script (GAS) can be used in four explicit ways:
- creation of a customized function from within a worksheet, like
- creation of a script from within a worksheet, like menu's, automated tasks
- creation of a script from within google sites, performing business logic
- stand-a-lone web application (script.google.com),
Furthermore, it allows you to access many of the Google Apps via services, making it a powerful tool.
Reference: GAS wiki