Ads have nothing to do with your phone. It appears because of the third-party apps installed on your phone. The easiest way to find the app that causes pop-up ads is to use the recent app's key. When a pop-up ad appears on your phone tap on the recent apps, and it will show you the annoying app.