Got a weird pop up screen - is it spam or malware?

I was at Starbucks, on Instagram and a popup window came up - like the kind that say rate this app. This message said, You've won (I don't remember the rest)...and the only way to close the window was to hit ok. Another window instantly popped up with a beep and said something like, would you like to go for another spin? plus more I don't remember. This time I did not click ok but rebooted. What was that?
On Instagram? Hmm. That sort of thing pops up in Safari sometimes. Never heard of it on Instagram. Probably a phishing scam. You sure it was on Instagram? Had you clicked on anything in Safari?
Yep, sure it was Instagram. I've had that happen on Safari too but never IS, so that really got my attention, especially when there was a beep.
Did it look official Instagram? Or more like a system pop up?
In addition to hitting ok to close the window, double clicking the home button to stop the app from working can also work and is safer, as I guess.
Not from Instagram for sure.
Yes, wish I'd thought of that! the 2nd pop up made me stop and think...but the first one I just ignored - like I would a pop up on my mac.
As long as you are not installing anything from unknown sources, you can rest assured.
As far as I know this kind of popups usually happens in browser apps or some web pages. Did Instagram redirect you to some web page before this popup appeared?

Original thread: https://forums.imore.com/threads/got-a-weird-pop-up-screen-is-it-spam-or-malware.371140/