The android activities represent a single screen with a user interface(UI) of an application and it will act as an entry point for users to interact with an app. If you have used C, C++ or Java programming languages then you must have seen that programs in C, C++ start from main() function. Similarly in the android system program starts with the onCreate() method.
The activity life cycle of the android is as shown below:

The following callbacks are specified by the Activity class. It’s not necessary to implement all the callback methods but it is important that you should understand each one.
- onCreate(): This is the first callback method and it is called when the activity is first created.
- onStart(): The onStart() callback method is called when an activity entered into the start state by completing onCreate() method.
- onResume(): The onResume() method is called when the user starts interacting with the application.
- onPause(): The onPause() method does not receive user input and cannot execute any code and called when the current activity is being paused and the previous activity is being resumed.
- onStop(): The onStop() method is called when the activity is no longer visible.
- onDestroy(): The onDestroy() method is called before the activity is destroyed by the system.
- onRestart(): The onRestart() method is called when the activity restarts after stopping it.