Well as mentioned by everyone else, please do not click on this as it will will do more harm to your device than good. I have seen these type of ads before, please tap the home button > settings >go to smart manager and clear the RAM. This usually does the trick.
This could either be from a website or an app, in order to figure this out, boot the device in safe mode and see if the issue is still there. If the issue is not there anymore, then a third party application is causing this which you may uninstall.
If the issue persists, you might have to do a soft reset, turn device off, hold the power button + volume down key for about 10 seconds (similar to a battery pull as the S6 doesn't have a removable battery).
If this doesn't work, Turn off your device press and hold power, volume up and the home button together, You'll see a blue screen with the Android on it, then you'll be taken to the recovery menu. Use the volume buttons to scroll and highlight Wipe Cache Partition.
The last resort would be to do a factory data reset, you can do this via your settings or use the buttons on your device.
Tap Settings >Backup and reset option >Factory Data Reset > Press Reset Device.
Or you can turn off your device press and hold power, volume up and the home button together, You'll see a blue screen with the Android on it, then you'll be taken to the recovery menu. Use the volume buttons to scroll and highlight “wipe data/factory reset", press power to select it.
Just make sure you do a back up before performing the last step FDR, as once the device is restored to factory settings, you will risk losing your data.