Tasker makes it possible to create both very simple and very extensive activities on Android that can be initiated based on a specific context (active application, time, date, location, event, gesture) or via home screen widget.
Example actions via tasker:
- Turn on GPS when Google Maps starts; turn off GPS when Google Maps closes
- Read incoming text messages aloud
- Automate backups
- Show a list of applications when headphones are plugged in
A lot of apps have either Tasker-support built in, or done so via a Tasker plugin. A useful list of ressources can be found at AndroidPIT. Though in German, it's easy to follow for non-German speakers (at least concerning the list of supported things), and also includes links to English ressources. The Tasker Wiki also is a useful ressource.