In all cases there's a phone number - "conveniently" for the victim, it's a toll-free number for their geographic location - and on the other end of the line is someone asking for money to make the popup go away. Needless to say, the person on the other end of the line doesn't have any legitimate connection with Apple, isn't going to make the pop-up go away, and is only interested in your financial details.
Fortunately, the fix for this is easy.
Put your iPhone or iPad into Airplane Mode (go into Settings and toggle the Airplane Mode switch into the off position).
Go to Settings > Safari and tap Clear History and Website Data.
Close Safari (double-press the Home button and swipe Safari up to close).
Exit Airplane Mode.
To reduce the risk of this sort of issue from happening in the future you can block popups (go to Settings > Safari and toggle the Block Pop-ups switch).