
There are four basic application components in android -
Android Activities
An activity represents a single screen with user interface e.g. an options menu of an application is one activity while the help menu of that application will be another activity. Moreover, most applications contain multiple activities e.g. suppose you have a gaming application that has an options display activity, a help display activity, a game playing activity and also an activity that is presented when an user opens the application.
When a new activity starts, it's pushed onto the back stack i.e. the old activity is paused and new activity takes the charge. When the new activity is finished or the user presses back button the old process or the process which is next in line in the stack is brought in front an resumes its process.Furthermore, there are several methods available in android SDK to monitor lifespan of an activity e.g. onStart(), onPause() are few of them.
Android Services
Services perform long running operations but unlike activities services operate in the background. Also unlike activities, services don't contain any user interfaces. Basically services are used for tasks that are done behind the scenes without interrupting with user's interaction with the device e.g. a service may be playing music while user is using some other application etc.
Since services run in the background, they run independently of the component that created it e.g. suppose a music player created a service that plays music so in this case the music will continue to play even if you close the component activity that made the audio file play i.e. the music player. Remember that you just closed the activity not the service that's why the music in above example is still playing; mind the difference here. Also, if allowed, a service can be bound to by some other application components.
Content Providers
Broadcast Receiver
The awesome thing about android system is that an application can start another application's component e.g. suppose you are building an application that needs user contacts. So rather than building a separate function that asks the user to input a contact you could simply use the contacts from the user's phone book and operate on that. However, you can't directly start other application's component. You first have to send a message to the system's process providing your intent to use the application's component and wait for the system to start the component for you.