It’s not a virus, but a malicious ad that is exploiting Safari.
Double tap the home button, then flick the preview for safari off the screen. Single tap the home button to exit the mode.
Go into the settings, icloud and if you sync your safari to iCloud, turn that off. THen go into safari and throw away your history. For good measure force your ipad to reboot by holding down the sleep and home keys for 20 seconds or so. WHen you see the silver apple, let go and let it reboot. You can try again, but you may end up needing to use another browser until this is fixed.