There are 3 types of services in Android:
(1) Background
(2) Foreground
(3) Bound
A Background Service is a service that runs only when the app is running so it’ll get terminated when the app is terminated.
A Foreground Service is a service that stays alive even when the app is terminated.
And a Bound Service is a service that runs only if the component it is bound to be still active.