Welcome to Android Central! Something you installed carried adware with it. You may have to uninstall apps one by one until that behavior goes away. Alternatively, you could do a factory reset, then reinstall apps one by one until the problem recurs--then you'll know which app is responsible.