You need to find the culprit app (yes, it's something that was downloaded to the phone).
This guide will help try to pin-point the nasty app (and when you do find it, don't forget to write a review on the Play Store to let others know that the dev is using intrusive ads on their apps).