My iPad has a popup saying I have a virus
You likely do not have a virus.
It's probably just a popup that gets launched every time you re-open Safari.

Go to:

Settings > Safari > "Clear History and Website Data."

You won't lose any bookmarks, it will just clear your browser history and open tabs.

Let us know if that works for you!