"Activities occur within the Android application and have limited life cycles. The Activity class provides a number of callbacks to know that the system state has changed. This includes: creating, starting, resuming, pausing, stopping, destroying, and restarting. The syntax used for these commands begins with 'On,' followed by the command, and then the parameters of the activity. Each command executes a function similar to its name. For example, OnPause is used when an activity is moved to the background but is still running."