'Apple iPhone hacked' pop-up
These pop-ups are theatre — Apple will never alert you through a random webpage. If you're genuinely concerned about your device security, close the pop-up entirely (don't click anything on it), restart your browser, and visit Apple's official website directly by typing the address yourself.
Stop and think before you act. If something feels urgent, threatening, or too good to be true — that urgency is the weapon. Scammers use pressure to override your judgement. Nothing is ever so urgent that you can't take five minutes to check, call back on a number you found yourself, or ask someone you trust.
What's happening
A scam pop-up which appears after clicking a dodgy link tells you that your details have be found in a data breach and your device is at risk of being compromised.