Pop-up says my computer has a virus or is locked
Take a breath: this is almost always a scary-looking web page, not a real virus, and you can close it safely.
Be careful: Real warnings from Microsoft, Apple or your antivirus never show a phone number and never ask you to call. Never call, pay, or let anyone connect to your computer.
What to do
Step 1: Don't call the number, click anything on the page, or type anything into it.
Step 2: Press Command + Option + Esc together to open Force Quit Applications.
Step 3: Click your web browser, for example Safari or Google Chrome, then click Force Quit.
Step 4: Hold the Shift key while you open the browser again, so it doesn't reopen the scam page.
Step 5: If the keys don't work, hold the power button (or Touch ID button) for 10 seconds to turn the Mac off, then turn it back on.
Step 6: Keep your Mac updated in System Settings > General > Software Update, as macOS checks for harmful software by itself.
Still stuck? If you already called the number, paid, or let someone connect, follow the answers 'I let a stranger connect to my computer' and 'I paid a scammer' right away, or ask a trusted friend or repair shop for help.