Foreground tasks are tasks that are visible to the user. In mobile environment, where tasks tend to run on full screen, only one task can be in the foreground. Background tasks are all other tasks. It could be any other application that is not currently shown on the screen, or it could be a daemon or a service that does not even have a screen. Which one it is depends on the context.