It's a scam, I'm not aware of any viruses that affect iOS devices (unless you've jailbroken it)
Assuming that this is in Safari as you don't give any information, clear its cache via Settings > Safari > Clear History And Website Data
Close Safari via the iPad’s taskbar : Force an app to close on your iPhone, iPad, or iPod touch - Apple Support
And do a soft-reset/reboot of the iPad : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the ‘slide to power off’), after which the Apple logo should appear