As you have tagged your question for WP8.1, apart from Silverlight apps, there are also Universal/Runtime apps. It's worth to mention that in Windows Phone 8.1 Runtime Apps you have a little different app lifecycle.
Any way, when your App is being Suspended, Deactivated, Tombstoned or put into Not-Running state, it is being stopped. and there is no way that it will work in Background (with official API and apart from Audioplayers, GPS tracking apps and other specially desinged models for that). A diffrenet case is also an App running under the lock screen (it is possible, but it's not what you are asking for). When you navigate away from your App, then Suspending event is raised or (Deactivated in WP Silverlight) - note also that you have very limited time with those events to save the state of your App.
There are ways for working in background, apart from BackgroundAgents, starting from Windows Phone 8.1 (both Silverlight and Runtime) you can use BackgroundTasks. They can be triggered (for example TimeTrigger, MaintanceTrigger) depending on their Registration - in time intervals and/or upon special conditions.
Here is a vary good article, and you can also find some information at this article.